public abstract class TileEntityLockableLoot extends TileEntityLockable implements ILootContainer
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
customName |
protected ResourceLocation |
lootTable |
protected long |
lootTableSeed |
blockType, INFINITE_EXTENT_AABB, pos, tileEntityInvalid, world| Constructor and Description |
|---|
TileEntityLockableLoot() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkLootAndRead(NBTTagCompound compound) |
protected boolean |
checkLootAndWrite(NBTTagCompound compound) |
void |
clear() |
void |
closeInventory(EntityPlayer player) |
ItemStack |
decrStackSize(int index,
int count)
Removes up to a specified number of items from an inventory slot and returns them in a new stack.
|
void |
fillWithLoot(EntityPlayer player) |
int |
getField(int id) |
int |
getFieldCount() |
protected abstract NonNullList<ItemStack> |
getItems() |
ResourceLocation |
getLootTable() |
ItemStack |
getStackInSlot(int index)
Returns the stack in the given slot.
|
boolean |
hasCustomName()
Returns true if this thing is named
|
boolean |
isItemValidForSlot(int index,
ItemStack stack)
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
|
boolean |
isUsableByPlayer(EntityPlayer player)
Don't rename this method to canInteractWith due to conflicts with Container
|
void |
openInventory(EntityPlayer player) |
ItemStack |
removeStackFromSlot(int index)
Removes a stack from the given slot and returns it.
|
void |
setCustomName(java.lang.String p_190575_1_) |
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
ItemStack stack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
void |
setLootTable(ResourceLocation p_189404_1_,
long p_189404_2_) |
createUnSidedHandler, getCapability, getDisplayName, getLockCode, hasCapability, isLocked, readFromNBT, setLockCode, writeToNBTaddInfoToCrashReport, canRenderBreaking, create, deserializeNBT, getBlockMetadata, getBlockType, getDistanceSq, getKey, getMaxRenderDistanceSquared, getPos, getRenderBoundingBox, getTileData, getUpdatePacket, getUpdateTag, getWorld, handleUpdateTag, hasFastRenderer, hasWorld, invalidate, isInvalid, markDirty, mirror, onChunkUnload, onDataPacket, onLoad, onlyOpsCanSetNbt, receiveClientEvent, register, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInventoryStackLimit, getSizeInventory, isEmpty, markDirtycreateContainer, getGuiIDgetNameprotected ResourceLocation lootTable
protected long lootTableSeed
protected java.lang.String customName
protected boolean checkLootAndRead(NBTTagCompound compound)
protected boolean checkLootAndWrite(NBTTagCompound compound)
public void fillWithLoot(EntityPlayer player)
public ResourceLocation getLootTable()
getLootTable in interface ILootContainerpublic void setLootTable(ResourceLocation p_189404_1_, long p_189404_2_)
public boolean hasCustomName()
hasCustomName in interface IWorldNameablepublic void setCustomName(java.lang.String p_190575_1_)
public ItemStack getStackInSlot(int index)
getStackInSlot in interface IInventorypublic ItemStack decrStackSize(int index, int count)
decrStackSize in interface IInventorypublic ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface IInventorypublic void setInventorySlotContents(int index,
ItemStack stack)
setInventorySlotContents in interface IInventorypublic boolean isUsableByPlayer(EntityPlayer player)
isUsableByPlayer in interface IInventorypublic void openInventory(EntityPlayer player)
openInventory in interface IInventorypublic void closeInventory(EntityPlayer player)
closeInventory in interface IInventorypublic boolean isItemValidForSlot(int index,
ItemStack stack)
isItemValidForSlot in interface IInventorypublic int getField(int id)
getField in interface IInventorypublic void setField(int id,
int value)
setField in interface IInventorypublic int getFieldCount()
getFieldCount in interface IInventorypublic void clear()
clear in interface IInventoryprotected abstract NonNullList<ItemStack> getItems()