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

    contents

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Make a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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, fromNBT, getContainerSize, getItem, getItemHandler, getItemHandlerSided, getItemStacks, getMaxStackSize, getSlotsForFace, getState, isEmpty, onInventoryChanged, read, readFromNBT, removeDirtyMarkListener, removeItem, removeItemNoUpdate, setChanged, setItem, startOpen, stillValid, stopOpen, toNBT, write, writeToNBT

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.world.Container

    canTakeItem, countItem, 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 interface net.minecraft.world.Container
      Overrides:
      canPlaceItem in class org.cyclops.cyclopscore.inventory.SimpleInventory