Class PartStateActiveVariableBase.SingularInventory
java.lang.Object
org.cyclops.cyclopscore.inventory.SimpleInventory
org.cyclops.integrateddynamics.core.part.PartStateActiveVariableBase.SingularInventory
- All Implemented Interfaces:
Iterable<net.minecraft.world.item.ItemStack>,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 net.minecraft.world.Container
net.minecraft.world.Container.ContainerIteratorNested 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_CODECFields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_BUFFER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanInsert(int slot) booleancanPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack) Methods inherited from class org.cyclops.cyclopscore.inventory.SimpleInventory
addDirtyMarkListener, canPlaceItemThroughFace, canTakeItemThroughFace, clearContent, equals, fromValueInput, getContainerSize, getItem, getItemStacks, getMaxStackSize, getSlotsForFace, getState, hashCode, isEmpty, onInventoryChanged, read, readFromNBT, removeDirtyMarkListener, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen, toValueOutput, write, writeToNBTMethods 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, iteratorMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
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:
canPlaceItemin interfacenet.minecraft.world.Container- Overrides:
canPlaceItemin classorg.cyclops.cyclopscore.inventory.SimpleInventory
-