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, writeToNBT
addInfoToCrashReport, 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, restrictNBTCopy, rotate, serializeNBT, setPos, setWorld, setWorldCreate, shouldRefresh, shouldRenderInPass, updateContainingBlockInfo, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInventoryStackLimit, getSizeInventory, isEmpty, markDirty
createContainer, getGuiID
getName
protected 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 ILootContainer
public void setLootTable(ResourceLocation p_189404_1_, long p_189404_2_)
public boolean hasCustomName()
hasCustomName
in interface IWorldNameable
public void setCustomName(java.lang.String p_190575_1_)
public ItemStack getStackInSlot(int index)
getStackInSlot
in interface IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
in interface IInventory
public ItemStack removeStackFromSlot(int index)
removeStackFromSlot
in interface IInventory
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
in interface IInventory
public boolean isUsableByPlayer(EntityPlayer player)
isUsableByPlayer
in interface IInventory
public void openInventory(EntityPlayer player)
openInventory
in interface IInventory
public void closeInventory(EntityPlayer player)
closeInventory
in interface IInventory
public boolean isItemValidForSlot(int index, ItemStack stack)
isItemValidForSlot
in interface IInventory
public int getField(int id)
getField
in interface IInventory
public void setField(int id, int value)
setField
in interface IInventory
public int getFieldCount()
getFieldCount
in interface IInventory
public void clear()
clear
in interface IInventory
protected abstract NonNullList<ItemStack> getItems()