Package net.minecraft.tileentity
Class BarrelTileEntity
- java.lang.Object
-
- All Implemented Interfaces:
IContainerProvider
,INamedContainerProvider
,IClearable
,IInventory
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class BarrelTileEntity extends LockableLootTileEntity
-
-
Field Summary
Fields Modifier and Type Field Description private NonNullList<ItemStack>
items
private int
openCount
-
Fields inherited from class net.minecraft.tileentity.LockableLootTileEntity
lootTable, 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 BarrelTileEntity()
private
BarrelTileEntity(TileEntityType<?> p_i49963_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Container
createMenu(int p_213906_1_, PlayerInventory p_213906_2_)
int
getContainerSize()
protected ITextComponent
getDefaultName()
protected NonNullList<ItemStack>
getItems()
void
load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
private void
playSound(BlockState p_213965_1_, SoundEvent p_213965_2_)
void
recheckOpen()
CompoundNBT
save(CompoundNBT p_189515_1_)
private void
scheduleRecheck()
protected void
setItems(NonNullList<ItemStack> p_199721_1_)
void
startOpen(PlayerEntity p_174889_1_)
void
stopOpen(PlayerEntity p_174886_1_)
private void
updateBlockState(BlockState p_213963_1_, boolean p_213963_2_)
-
Methods inherited from class net.minecraft.tileentity.LockableLootTileEntity
canOpen, clearContent, createMenu, getItem, isEmpty, removeItem, removeItemNoUpdate, setItem, setLootTable, setLootTable, stillValid, tryLoadLootTable, trySaveLootTable, unpackLootTable
-
Methods inherited from class net.minecraft.tileentity.LockableTileEntity
canUnlock, createUnSidedHandler, getCapability, getCustomName, getDisplayName, getName, invalidateCaps, 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, getMaxStackSize, hasAnyOf, setChanged
-
Methods inherited from interface net.minecraft.util.INameable
hasCustomName
-
-
-
-
Field Detail
-
items
private NonNullList<ItemStack> items
-
openCount
private int openCount
-
-
Constructor Detail
-
BarrelTileEntity
private BarrelTileEntity(TileEntityType<?> p_i49963_1_)
-
BarrelTileEntity
public BarrelTileEntity()
-
-
Method Detail
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classLockableTileEntity
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classLockableTileEntity
-
getContainerSize
public int getContainerSize()
-
getItems
protected NonNullList<ItemStack> getItems()
- Specified by:
getItems
in classLockableLootTileEntity
-
setItems
protected void setItems(NonNullList<ItemStack> p_199721_1_)
- Specified by:
setItems
in classLockableLootTileEntity
-
getDefaultName
protected ITextComponent getDefaultName()
- Specified by:
getDefaultName
in classLockableTileEntity
-
createMenu
protected Container createMenu(int p_213906_1_, PlayerInventory p_213906_2_)
- Specified by:
createMenu
in classLockableTileEntity
-
startOpen
public void startOpen(PlayerEntity p_174889_1_)
-
scheduleRecheck
private void scheduleRecheck()
-
recheckOpen
public void recheckOpen()
-
stopOpen
public void stopOpen(PlayerEntity p_174886_1_)
-
updateBlockState
private void updateBlockState(BlockState p_213963_1_, boolean p_213963_2_)
-
playSound
private void playSound(BlockState p_213965_1_, SoundEvent p_213965_2_)
-
-