public class LecternTileEntity extends TileEntity implements IClearable, INamedContainerProvider
Modifier and Type | Field and Description |
---|---|
private ItemStack |
book |
private IInventory |
bookAccess |
private IIntArray |
dataAccess |
private int |
page |
private int |
pageCount |
level, remove, worldPosition
INFINITE_EXTENT_AABB
Constructor and Description |
---|
LecternTileEntity() |
Modifier and Type | Method and Description |
---|---|
void |
clearContent() |
private CommandSource |
createCommandSourceStack(PlayerEntity p_214039_1_) |
Container |
createMenu(int p_createMenu_1_,
PlayerInventory p_createMenu_2_,
PlayerEntity p_createMenu_3_) |
ItemStack |
getBook() |
ITextComponent |
getDisplayName() |
int |
getPage() |
int |
getRedstoneSignal() |
boolean |
hasBook() |
void |
load(BlockState p_230337_1_,
CompoundNBT p_230337_2_) |
private void |
onBookItemRemove() |
boolean |
onlyOpCanSetNbt() |
private ItemStack |
resolveBook(ItemStack p_214047_1_,
PlayerEntity p_214047_2_) |
CompoundNBT |
save(CompoundNBT p_189515_1_) |
void |
setBook(ItemStack p_214045_1_) |
void |
setBook(ItemStack p_214040_1_,
PlayerEntity p_214040_2_) |
private void |
setPage(int p_214035_1_) |
clearCache, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getTileData, getType, getUpdatePacket, getUpdateTag, getViewDistance, hasLevel, isRemoved, loadStatic, logInvalidState, mirror, onChunkUnloaded, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
tryClear
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
getCapability, getCapability
private final IInventory bookAccess
private final IIntArray dataAccess
private ItemStack book
private int page
private int pageCount
public ItemStack getBook()
public boolean hasBook()
public void setBook(ItemStack p_214045_1_)
private void onBookItemRemove()
public void setBook(ItemStack p_214040_1_, @Nullable PlayerEntity p_214040_2_)
private void setPage(int p_214035_1_)
public int getPage()
public int getRedstoneSignal()
private ItemStack resolveBook(ItemStack p_214047_1_, @Nullable PlayerEntity p_214047_2_)
private CommandSource createCommandSourceStack(@Nullable PlayerEntity p_214039_1_)
public boolean onlyOpCanSetNbt()
onlyOpCanSetNbt
in class TileEntity
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
load
in class TileEntity
public CompoundNBT save(CompoundNBT p_189515_1_)
save
in class TileEntity
public void clearContent()
clearContent
in interface IClearable
public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_)
createMenu
in interface IContainerProvider
public ITextComponent getDisplayName()
getDisplayName
in interface INamedContainerProvider