Package net.minecraft.tileentity
Class LecternTileEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<TileEntity>
-
- net.minecraft.tileentity.TileEntity
-
- net.minecraft.tileentity.LecternTileEntity
-
- All Implemented Interfaces:
IContainerProvider
,INamedContainerProvider
,IClearable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeTileEntity
,INBTSerializable<CompoundNBT>
public class LecternTileEntity extends TileEntity implements IClearable, INamedContainerProvider
-
-
Field Summary
Fields Modifier and Type Field Description private ItemStack
book
private IInventory
bookAccess
private IIntArray
dataAccess
private int
page
private int
pageCount
-
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 Constructor Description LecternTileEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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_)
-
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, rotate, setChanged, setLevelAndPosition, setPosition, setRemoved, triggerEvent
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, 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, getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeTileEntity
deserializeNBT, deserializeNBT, getModelData, getRenderBoundingBox, getTileEntity, handleUpdateTag, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
-
-
-
Field Detail
-
bookAccess
private final IInventory bookAccess
-
dataAccess
private final IIntArray dataAccess
-
book
private ItemStack book
-
page
private int page
-
pageCount
private int pageCount
-
-
Method Detail
-
getBook
public ItemStack getBook()
-
hasBook
public boolean hasBook()
-
setBook
public void setBook(ItemStack p_214045_1_)
-
onBookItemRemove
private void onBookItemRemove()
-
setBook
public void setBook(ItemStack p_214040_1_, @Nullable PlayerEntity p_214040_2_)
-
setPage
private void setPage(int p_214035_1_)
-
getPage
public int getPage()
-
getRedstoneSignal
public int getRedstoneSignal()
-
resolveBook
private ItemStack resolveBook(ItemStack p_214047_1_, @Nullable PlayerEntity p_214047_2_)
-
createCommandSourceStack
private CommandSource createCommandSourceStack(@Nullable PlayerEntity p_214039_1_)
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt()
- Overrides:
onlyOpCanSetNbt
in classTileEntity
-
load
public void load(BlockState p_230337_1_, CompoundNBT p_230337_2_)
- Overrides:
load
in classTileEntity
-
save
public CompoundNBT save(CompoundNBT p_189515_1_)
- Overrides:
save
in classTileEntity
-
clearContent
public void clearContent()
- Specified by:
clearContent
in interfaceIClearable
-
createMenu
public Container createMenu(int p_createMenu_1_, PlayerInventory p_createMenu_2_, PlayerEntity p_createMenu_3_)
- Specified by:
createMenu
in interfaceIContainerProvider
-
getDisplayName
public ITextComponent getDisplayName()
- Specified by:
getDisplayName
in interfaceINamedContainerProvider
-
-