public class LecternBlockEntity extends BaseBlockEntity implements org.cloudburstmc.api.blockentity.Lectern
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing| Constructor and Description |
|---|
LecternBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type,
org.cloudburstmc.api.level.chunk.Chunk chunk,
com.nukkitx.math.vector.Vector3i position) |
| Modifier and Type | Method and Description |
|---|---|
org.cloudburstmc.api.item.ItemStack |
getBook() |
int |
getLeftPage() |
int |
getPage() |
int |
getRightPage() |
int |
getTotalPages() |
boolean |
hasBook() |
protected void |
init() |
boolean |
isSpawnable() |
boolean |
isValid() |
void |
loadAdditionalData(com.nukkitx.nbt.NbtMap tag) |
void |
onBreak() |
void |
saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag) |
void |
setBook(org.cloudburstmc.api.item.ItemStack item) |
void |
setLeftPage(int newLeftPage) |
void |
setPage(int page) |
void |
setRightPage(int newRightPage) |
close, getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServer, getServerTag, getTag, getType, hasCustomName, isClosed, isMovable, onUpdate, saveClientData, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll, updateFromClient, updateNbtMappublic LecternBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type,
org.cloudburstmc.api.level.chunk.Chunk chunk,
com.nukkitx.math.vector.Vector3i position)
public boolean isValid()
isValid in interface org.cloudburstmc.api.blockentity.BlockEntityisValid in class BaseBlockEntityprotected void init()
init in class BaseBlockEntitypublic void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)
loadAdditionalData in class BaseBlockEntitypublic void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)
saveAdditionalData in class BaseBlockEntitypublic void onBreak()
onBreak in interface org.cloudburstmc.api.blockentity.BlockEntityonBreak in class BaseBlockEntitypublic boolean hasBook()
hasBook in interface org.cloudburstmc.api.blockentity.Lectern@Nullable public org.cloudburstmc.api.item.ItemStack getBook()
getBook in interface org.cloudburstmc.api.blockentity.Lecternpublic void setBook(org.cloudburstmc.api.item.ItemStack item)
setBook in interface org.cloudburstmc.api.blockentity.Lecternpublic int getLeftPage()
public void setLeftPage(int newLeftPage)
public int getRightPage()
public void setRightPage(int newRightPage)
public int getPage()
getPage in interface org.cloudburstmc.api.blockentity.Lecternpublic void setPage(@Nonnegative int page)
setPage in interface org.cloudburstmc.api.blockentity.Lecternpublic int getTotalPages()
getTotalPages in interface org.cloudburstmc.api.blockentity.Lecternpublic boolean isSpawnable()
isSpawnable in interface org.cloudburstmc.api.blockentity.BlockEntityisSpawnable in class BaseBlockEntityCopyright © 2021. All rights reserved.