Package codechicken.lib.inventory
Class InventoryCopy
java.lang.Object
codechicken.lib.inventory.InventoryCopy
- All Implemented Interfaces:
net.minecraft.world.Clearable,net.minecraft.world.Container
Creates a copy of an IInventory for extended simulation
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean[]net.minecraft.world.Containernet.minecraft.world.item.ItemStack[]Fields inherited from interface net.minecraft.world.Container
DEFAULT_DISTANCE_LIMIT, LARGE_MAX_STACK_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack) voidintnet.minecraft.world.item.ItemStackgetItem(int slot) intbooleanisEmpty()open(InventoryRange access) net.minecraft.world.item.ItemStackremoveItem(int slot, int amount) net.minecraft.world.item.ItemStackremoveItemNoUpdate(int slot) voidvoidsetItem(int slot, net.minecraft.world.item.ItemStack stack) voidstartOpen(net.minecraft.world.entity.player.Player player) booleanstillValid(net.minecraft.world.entity.player.Player player) voidstopOpen(net.minecraft.world.entity.player.Player player) voidupdate()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.Container
canTakeItem, countItem, hasAnyMatching, hasAnyOf
-
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
-
getContainerSize
public int getContainerSize()- Specified by:
getContainerSizein interfacenet.minecraft.world.Container
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacenet.minecraft.world.Container
-
getItem
@Nonnull public net.minecraft.world.item.ItemStack getItem(int slot) - Specified by:
getItemin interfacenet.minecraft.world.Container
-
removeItem
@Nonnull public net.minecraft.world.item.ItemStack removeItem(int slot, int amount) - Specified by:
removeItemin interfacenet.minecraft.world.Container
-
removeItemNoUpdate
@Nonnull public net.minecraft.world.item.ItemStack removeItemNoUpdate(int slot) - Specified by:
removeItemNoUpdatein interfacenet.minecraft.world.Container
-
setItem
public void setItem(int slot, net.minecraft.world.item.ItemStack stack) - Specified by:
setItemin interfacenet.minecraft.world.Container
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin interfacenet.minecraft.world.Container
-
getMaxStackSize
public int getMaxStackSize()- Specified by:
getMaxStackSizein interfacenet.minecraft.world.Container
-
setChanged
public void setChanged()- Specified by:
setChangedin interfacenet.minecraft.world.Container
-
canPlaceItem
public boolean canPlaceItem(int i, net.minecraft.world.item.ItemStack itemstack) - Specified by:
canPlaceItemin interfacenet.minecraft.world.Container
-
startOpen
public void startOpen(net.minecraft.world.entity.player.Player player) - Specified by:
startOpenin interfacenet.minecraft.world.Container
-
stopOpen
public void stopOpen(net.minecraft.world.entity.player.Player player) - Specified by:
stopOpenin interfacenet.minecraft.world.Container
-
clearContent
public void clearContent()- Specified by:
clearContentin interfacenet.minecraft.world.Clearable
-