Package net.minecraft.tileentity
Class LockableLootTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.LockableTileEntity
-
- net.minecraft.tileentity.LockableLootTileEntity
-
- All Implemented Interfaces:
IContainerProvider
,INamedContainerProvider
,IClearable
,IInventory
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
- Direct Known Subclasses:
BarrelTileEntity
,ChestTileEntity
,DispenserTileEntity
,HopperTileEntity
,ShulkerBoxTileEntity
public abstract class LockableLootTileEntity extends LockableTileEntity
-
-
Field Summary
Fields Modifier and Type Field Description protected ResourceLocation
lootTable
protected long
lootTableSeed
-
Fields inherited from class net.minecraft.tileentity.TileEntity
level, remove, worldPosition
-
Fields inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
INFINITE_EXTENT_AABB
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LockableLootTileEntity(TileEntityType<?> p_i48284_1_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
canOpen(PlayerEntity p_213904_1_)
void
clearContent()
Container
createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_)
ItemStack
getItem(int p_70301_1_)
protected abstract NonNullList<ItemStack>
getItems()
boolean
isEmpty()
ItemStack
removeItem(int p_70298_1_, int p_70298_2_)
ItemStack
removeItemNoUpdate(int p_70304_1_)
void
setItem(int p_70299_1_, ItemStack p_70299_2_)
protected abstract void
setItems(NonNullList<ItemStack> p_199721_1_)
void
setLootTable(ResourceLocation p_189404_1_, long p_189404_2_)
static void
setLootTable(IBlockReader p_195479_0_, java.util.Random p_195479_1_, BlockPos p_195479_2_, ResourceLocation p_195479_3_)
boolean
stillValid(PlayerEntity p_70300_1_)
protected boolean
tryLoadLootTable(CompoundNBT p_184283_1_)
protected boolean
trySaveLootTable(CompoundNBT p_184282_1_)
void
unpackLootTable(PlayerEntity p_184281_1_)
-
Methods inherited from class net.minecraft.tileentity.LockableTileEntity
canUnlock, createMenu, createUnSidedHandler, getCapability, getCustomName, getDefaultName, getDisplayName, getName, invalidateCaps, load, save, setCustomName
-
Methods inherited from class net.minecraft.tileentity.TileEntity
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, onlyOpCanSetNbt, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
Methods inherited from interface net.minecraft.inventory.IInventory
canPlaceItem, countItem, getContainerSize, getMaxStackSize, hasAnyOf, setChanged, startOpen, stopOpen
-
Methods inherited from interface net.minecraft.util.INameable
hasCustomName
-
-
-
-
Field Detail
-
lootTable
@Nullable protected ResourceLocation lootTable
-
lootTableSeed
protected long lootTableSeed
-
-
Constructor Detail
-
LockableLootTileEntity
protected LockableLootTileEntity(TileEntityType<?> p_i48284_1_)
-
-
Method Detail
-
setLootTable
public static void setLootTable(IBlockReader p_195479_0_, java.util.Random p_195479_1_, BlockPos p_195479_2_, ResourceLocation p_195479_3_)
-
tryLoadLootTable
protected boolean tryLoadLootTable(CompoundNBT p_184283_1_)
-
trySaveLootTable
protected boolean trySaveLootTable(CompoundNBT p_184282_1_)
-
unpackLootTable
public void unpackLootTable(@Nullable PlayerEntity p_184281_1_)
-
setLootTable
public void setLootTable(ResourceLocation p_189404_1_, long p_189404_2_)
-
isEmpty
public boolean isEmpty()
-
getItem
public ItemStack getItem(int p_70301_1_)
-
removeItem
public ItemStack removeItem(int p_70298_1_, int p_70298_2_)
-
removeItemNoUpdate
public ItemStack removeItemNoUpdate(int p_70304_1_)
-
setItem
public void setItem(int p_70299_1_, ItemStack p_70299_2_)
-
stillValid
public boolean stillValid(PlayerEntity p_70300_1_)
-
clearContent
public void clearContent()
-
getItems
protected abstract NonNullList<ItemStack> getItems()
-
setItems
protected abstract void setItems(NonNullList<ItemStack> p_199721_1_)
-
canOpen
public boolean canOpen(PlayerEntity p_213904_1_)
- Overrides:
canOpen
in classLockableTileEntity
-
createMenu
@Nullable public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_)
- Specified by:
createMenu
in interfaceIContainerProvider
- Overrides:
createMenu
in classLockableTileEntity
-
-