Class LecternBlockEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.LecternBlockEntity
- All Implemented Interfaces:
Clearable
,MenuConstructor
,MenuProvider
,ICapabilityProvider
,ICapabilityProviderImpl<BlockEntity>
,IForgeBlockEntity
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
BlockEntity.ComponentHelper, BlockEntity.DataComponentInput
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescription(package private) ItemStack
private final Container
static final int
private final ContainerData
static final int
static final int
(package private) int
private int
static final int
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPosition
Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
private CommandSourceStack
createCommandSourceStack
(Player p_59535_) createMenu
(int p_59562_, Inventory p_59563_, Player p_59564_) getBook()
int
getPage()
private static int
getPageCount
(ItemStack p_330049_) int
boolean
hasBook()
protected void
loadAdditional
(CompoundTag p_331238_, HolderLookup.Provider p_333677_) (package private) void
boolean
private ItemStack
resolveBook
(ItemStack p_59555_, Player p_59556_) protected void
saveAdditional
(CompoundTag p_187509_, HolderLookup.Provider p_331979_) void
void
(package private) void
setPage
(int p_59533_) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, getUpdatePacket, getUpdateTag, hasLevel, isRemoved, loadCustomOnly, loadStatic, loadWithComponents, onChunkUnloaded, parseCustomNameSafe, removeComponentsFromTag, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setLevel, 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.IForgeBlockEntity
getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
DATA_PAGE
public static final int DATA_PAGE- See Also:
-
NUM_DATA
public static final int NUM_DATA- See Also:
-
SLOT_BOOK
public static final int SLOT_BOOK- See Also:
-
NUM_SLOTS
public static final int NUM_SLOTS- See Also:
-
bookAccess
-
dataAccess
-
book
ItemStack book -
page
int page -
pageCount
private int pageCount
-
-
Constructor Details
-
LecternBlockEntity
-
-
Method Details
-
getBook
-
hasBook
public boolean hasBook() -
setBook
-
onBookItemRemove
void onBookItemRemove() -
setBook
-
setPage
void setPage(int p_59533_) -
getPage
public int getPage() -
getRedstoneSignal
public int getRedstoneSignal() -
resolveBook
-
createCommandSourceStack
-
onlyOpCanSetNbt
public boolean onlyOpCanSetNbt()- Overrides:
onlyOpCanSetNbt
in classBlockEntity
-
loadAdditional
- Overrides:
loadAdditional
in classBlockEntity
-
saveAdditional
- Overrides:
saveAdditional
in classBlockEntity
-
clearContent
public void clearContent()- Specified by:
clearContent
in interfaceClearable
-
createMenu
- Specified by:
createMenu
in interfaceMenuConstructor
-
getDisplayName
- Specified by:
getDisplayName
in interfaceMenuProvider
-
getPageCount
-