Class PartStateActiveVariableBase.SingularInventory
java.lang.Object
org.cyclops.cyclopscore.inventory.SimpleInventory
org.cyclops.integrateddynamics.core.part.PartStateActiveVariableBase.SingularInventory
- 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
- Enclosing class:
PartStateActiveVariableBase<P extends IPartType>
public static class PartStateActiveVariableBase.SingularInventory
extends org.cyclops.cyclopscore.inventory.SimpleInventory
An inventory that can only hold one filled slot at a time.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.cyclopscore.persist.nbt.INBTSerializable
org.cyclops.cyclopscore.persist.nbt.INBTSerializable.SelfNBTClassType
-
Field Summary
Fields inherited from class org.cyclops.cyclopscore.inventory.SimpleInventory
CODEC, contents, STREAM_CODEC
Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canInsert
(int slot) boolean
canPlaceItem
(int i, net.minecraft.world.item.ItemStack itemstack) Methods inherited from class org.cyclops.cyclopscore.inventory.SimpleInventory
addDirtyMarkListener, canPlaceItemThroughFace, canTakeItemThroughFace, clearContent, equals, fromNBT, getContainerSize, getItem, getItemHandler, getItemHandlerSided, getItemStacks, getMaxStackSize, getSlotsForFace, getState, hashCode, isEmpty, onInventoryChanged, read, readFromNBT, removeDirtyMarkListener, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen, toNBT, write, writeToNBT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, getMaxStackSize, hasAnyMatching, hasAnyOf
-
Constructor Details
-
SingularInventory
public SingularInventory(int size) Make a new instance.- Parameters:
size
- The amount of slots in the inventory.
-
-
Method Details
-
canInsert
protected boolean canInsert(int slot) -
canPlaceItem
public boolean canPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack) - Specified by:
canPlaceItem
in interfacenet.minecraft.world.Container
- Overrides:
canPlaceItem
in classorg.cyclops.cyclopscore.inventory.SimpleInventory
-