public class ArrayInventory
extends java.lang.Object
implements net.minecraft.inventory.Inventory
| Modifier and Type | Field and Description |
|---|---|
protected net.minecraft.item.ItemStack[] |
items |
| Constructor and Description |
|---|
ArrayInventory(int size) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPlayerUse(net.minecraft.entity.player.PlayerEntity player) |
void |
clear() |
int |
getMaxCountPerStack() |
net.minecraft.item.ItemStack |
getStack(int index) |
boolean |
isEmpty() |
void |
markDirty() |
protected void |
onItemAdded(int index) |
protected void |
onItemRemoved(int index) |
void |
readFromNBT(net.minecraft.nbt.CompoundTag nbt) |
net.minecraft.item.ItemStack |
removeStack(int index) |
net.minecraft.item.ItemStack |
removeStack(int index,
int count) |
void |
setStack(int index,
net.minecraft.item.ItemStack stack) |
int |
size() |
void |
writeToNBT(net.minecraft.nbt.CompoundTag nbt) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic void readFromNBT(net.minecraft.nbt.CompoundTag nbt)
public void writeToNBT(net.minecraft.nbt.CompoundTag nbt)
protected void onItemAdded(int index)
protected void onItemRemoved(int index)
public int size()
size in interface net.minecraft.inventory.Inventorypublic boolean isEmpty()
isEmpty in interface net.minecraft.inventory.Inventorypublic net.minecraft.item.ItemStack getStack(int index)
getStack in interface net.minecraft.inventory.Inventorypublic net.minecraft.item.ItemStack removeStack(int index,
int count)
removeStack in interface net.minecraft.inventory.Inventorypublic net.minecraft.item.ItemStack removeStack(int index)
removeStack in interface net.minecraft.inventory.Inventorypublic void setStack(int index,
net.minecraft.item.ItemStack stack)
setStack in interface net.minecraft.inventory.Inventorypublic int getMaxCountPerStack()
getMaxCountPerStack in interface net.minecraft.inventory.Inventorypublic void markDirty()
markDirty in interface net.minecraft.inventory.Inventorypublic boolean canPlayerUse(net.minecraft.entity.player.PlayerEntity player)
canPlayerUse in interface net.minecraft.inventory.Inventorypublic void clear()
clear in interface net.minecraft.util.Clearable