Class SimpleInventory
java.lang.Object
org.cyclops.cyclopscore.inventory.SimpleInventory
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container,net.minecraft.world.WorldlyContainer,org.cyclops.cyclopscore.inventory.INBTInventory,org.cyclops.cyclopscore.persist.nbt.INBTSerializable
- Direct Known Subclasses:
LargeInventory,NBTSimpleInventoryItemHeld,NBTSimpleInventoryItemStack
@Deprecated
public class SimpleInventory
extends Object
implements org.cyclops.cyclopscore.inventory.INBTInventory, net.minecraft.world.WorldlyContainer
Deprecated.
A basic inventory implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.cyclopscore.persist.nbt.INBTSerializable
org.cyclops.cyclopscore.persist.nbt.INBTSerializable.SelfNBTClassType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SimpleInventory> Deprecated.protected final net.minecraft.world.item.ItemStack[]Deprecated.static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SimpleInventory> Deprecated.Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Default constructor for NBT persistence, don't call this yourself.SimpleInventory(int size, int stackLimit) Deprecated.Make a new instance.SimpleInventory(int size, int stackLimit, List<net.minecraft.world.item.ItemStack> contents) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDirtyMarkListener(org.cyclops.cyclopscore.persist.IDirtyMarkListener dirtyMarkListener) Deprecated.Add a dirty marking listener.booleancanPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack) Deprecated.booleancanPlaceItemThroughFace(int index, net.minecraft.world.item.ItemStack itemStackIn, net.minecraft.core.Direction direction) Deprecated.booleancanTakeItemThroughFace(int index, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction direction) Deprecated.voidDeprecated.booleanDeprecated.voidfromNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag tag) Deprecated.intDeprecated.net.minecraft.world.item.ItemStackgetItem(int slotId) Deprecated.net.neoforged.neoforge.items.IItemHandlerDeprecated.net.neoforged.neoforge.items.IItemHandlergetItemHandlerSided(net.minecraft.core.Direction side) Deprecated.net.minecraft.world.item.ItemStack[]Deprecated.Get the array ofItemStackinside this inventory.intDeprecated.int[]getSlotsForFace(net.minecraft.core.Direction side) Deprecated.intgetState()Deprecated.inthashCode()Deprecated.booleanisEmpty()Deprecated.protected voidDeprecated.voidread(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data) Deprecated.voidreadFromNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data, String tag) Deprecated.voidremoveDirtyMarkListener(org.cyclops.cyclopscore.persist.IDirtyMarkListener dirtyMarkListener) Deprecated.Remove a dirty marking listener.net.minecraft.world.item.ItemStackremoveItem(int slotId, int count) Deprecated.net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slotId) Deprecated.voidDeprecated.voidsetItem(int slotId, net.minecraft.world.item.ItemStack itemstack) Deprecated.voidstartOpen(net.minecraft.world.entity.player.Player playerIn) Deprecated.booleanstillValid(net.minecraft.world.entity.player.Player entityplayer) Deprecated.voidstopOpen(net.minecraft.world.entity.player.Player playerIn) Deprecated.net.minecraft.nbt.CompoundTagtoNBT(net.minecraft.core.HolderLookup.Provider provider) Deprecated.voidwrite(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data) Deprecated.voidwriteToNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data, String tag) Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf
-
Field Details
-
CODEC
Deprecated. -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SimpleInventory> STREAM_CODECDeprecated. -
contents
protected final net.minecraft.world.item.ItemStack[] contentsDeprecated.
-
-
Constructor Details
-
SimpleInventory
public SimpleInventory()Deprecated.Default constructor for NBT persistence, don't call this yourself. -
SimpleInventory
public SimpleInventory(int size, int stackLimit) Deprecated.Make a new instance.- Parameters:
size- The amount of slots in the inventory.stackLimit- The stack limit for each slot.
-
SimpleInventory
Deprecated.
-
-
Method Details
-
addDirtyMarkListener
public void addDirtyMarkListener(org.cyclops.cyclopscore.persist.IDirtyMarkListener dirtyMarkListener) Deprecated.Add a dirty marking listener.- Parameters:
dirtyMarkListener- The dirty mark listener.
-
removeDirtyMarkListener
public void removeDirtyMarkListener(org.cyclops.cyclopscore.persist.IDirtyMarkListener dirtyMarkListener) Deprecated.Remove a dirty marking listener.- Parameters:
dirtyMarkListener- The dirty mark listener.
-
getContainerSize
public int getContainerSize()Deprecated.- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
getItem
public net.minecraft.world.item.ItemStack getItem(int slotId) Deprecated.- Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
public net.minecraft.world.item.ItemStack removeItem(int slotId, int count) Deprecated.- Specified by:
removeItemin interfacenet.minecraft.world.Container
-
setItem
public void setItem(int slotId, net.minecraft.world.item.ItemStack itemstack) Deprecated.- Specified by:
setItemin interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()Deprecated.- Specified by:
getMaxStackSizein interfacenet.minecraft.world.Container
-
onInventoryChanged
protected void onInventoryChanged()Deprecated. -
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player entityplayer) Deprecated.- Specified by:
stillValidin interfacenet.minecraft.world.Container
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player playerIn) Deprecated.- Specified by:
startOpenin interfacenet.minecraft.world.Container
-
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player playerIn) Deprecated.- Specified by:
stopOpenin interfacenet.minecraft.world.Container
-
read
public void read(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data) Deprecated.- Specified by:
readin interfaceorg.cyclops.cyclopscore.inventory.INBTInventory
-
readFromNBT
public void readFromNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data, String tag) Deprecated. -
write
public void write(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data) Deprecated.- Specified by:
writein interfaceorg.cyclops.cyclopscore.inventory.INBTInventory
-
writeToNBT
public void writeToNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag data, String tag) Deprecated. -
removeItemNoUpdate
public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slotId) Deprecated.- Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
getItemStacks
public net.minecraft.world.item.ItemStack[] getItemStacks()Deprecated.Get the array ofItemStackinside this inventory.- Returns:
- The items in this inventory.
-
canPlaceItem
public boolean canPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack) Deprecated.- Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
clearContent
public void clearContent()Deprecated.- Specified by:
clearContentin interfacenet.minecraft.world.Clearable
-
setChanged
public void setChanged()Deprecated.- Specified by:
setChangedin interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()Deprecated.- Specified by:
isEmptyin interfacenet.minecraft.world.Container- Specified by:
isEmptyin interfaceorg.cyclops.cyclopscore.inventory.INBTInventory
-
toNBT
public net.minecraft.nbt.CompoundTag toNBT(net.minecraft.core.HolderLookup.Provider provider) Deprecated.- Specified by:
toNBTin interfaceorg.cyclops.cyclopscore.persist.nbt.INBTSerializable
-
fromNBT
public void fromNBT(net.minecraft.core.HolderLookup.Provider provider, net.minecraft.nbt.CompoundTag tag) Deprecated.- Specified by:
fromNBTin interfaceorg.cyclops.cyclopscore.persist.nbt.INBTSerializable
-
getItemHandler
public net.neoforged.neoforge.items.IItemHandler getItemHandler()Deprecated. -
getItemHandlerSided
public net.neoforged.neoforge.items.IItemHandler getItemHandlerSided(net.minecraft.core.Direction side) Deprecated. -
getState
public int getState()Deprecated.- Returns:
- The inventory state.
-
getSlotsForFace
public int[] getSlotsForFace(net.minecraft.core.Direction side) Deprecated.- Specified by:
getSlotsForFacein interfacenet.minecraft.world.WorldlyContainer
-
canPlaceItemThroughFace
public boolean canPlaceItemThroughFace(int index, net.minecraft.world.item.ItemStack itemStackIn, @Nullable net.minecraft.core.Direction direction) Deprecated.- Specified by:
canPlaceItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
canTakeItemThroughFace
public boolean canTakeItemThroughFace(int index, net.minecraft.world.item.ItemStack stack, net.minecraft.core.Direction direction) Deprecated.- Specified by:
canTakeItemThroughFacein interfacenet.minecraft.world.WorldlyContainer
-
equals
Deprecated. -
hashCode
public int hashCode()Deprecated.
-