Class InventoryCopy

java.lang.Object
codechicken.lib.inventory.InventoryCopy
All Implemented Interfaces:
net.minecraft.world.Clearable, net.minecraft.world.Container

public class InventoryCopy extends Object implements net.minecraft.world.Container
Creates a copy of an IInventory for extended simulation
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean[]
     
    net.minecraft.world.Container
     
    net.minecraft.world.item.ItemStack[]
     

    Fields inherited from interface net.minecraft.world.Container

    DEFAULT_DISTANCE_BUFFER
  • Constructor Summary

    Constructors
    Constructor
    Description
    InventoryCopy(net.minecraft.world.Container inv)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack)
     
    void
     
    int
     
    net.minecraft.world.item.ItemStack
    getItem(int slot)
     
    boolean
     
     
    net.minecraft.world.item.ItemStack
    removeItem(int slot, int amount)
     
    net.minecraft.world.item.ItemStack
     
    void
     
    void
    setItem(int slot, net.minecraft.world.item.ItemStack stack)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
     

    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, getMaxStackSize, getMaxStackSize, hasAnyMatching, hasAnyOf, startOpen, stopOpen
  • Field Details

    • accessible

      public boolean[] accessible
    • items

      public net.minecraft.world.item.ItemStack[] items
    • inv

      public net.minecraft.world.Container inv
  • Constructor Details

    • InventoryCopy

      public InventoryCopy(net.minecraft.world.Container inv)
  • Method Details

    • update

      public void update()
    • open

      public InventoryCopy open(InventoryRange access)
    • getContainerSize

      public int getContainerSize()
      Specified by:
      getContainerSize in interface net.minecraft.world.Container
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.world.Container
    • getItem

      public net.minecraft.world.item.ItemStack getItem(int slot)
      Specified by:
      getItem in interface net.minecraft.world.Container
    • removeItem

      public net.minecraft.world.item.ItemStack removeItem(int slot, int amount)
      Specified by:
      removeItem in interface net.minecraft.world.Container
    • removeItemNoUpdate

      public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot)
      Specified by:
      removeItemNoUpdate in interface net.minecraft.world.Container
    • setItem

      public void setItem(int slot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      setItem in interface net.minecraft.world.Container
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in interface net.minecraft.world.Container
    • setChanged

      public void setChanged()
      Specified by:
      setChanged in interface net.minecraft.world.Container
    • canPlaceItem

      public boolean canPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack)
      Specified by:
      canPlaceItem in interface net.minecraft.world.Container
    • clearContent

      public void clearContent()
      Specified by:
      clearContent in interface net.minecraft.world.Clearable