Class LecternBlockEntity

java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.LecternBlockEntity
All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity, org.cloudburstmc.api.blockentity.Lectern

public class LecternBlockEntity extends BaseBlockEntity implements org.cloudburstmc.api.blockentity.Lectern
  • Constructor Details

    • LecternBlockEntity

      public LecternBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position)
  • Method Details

    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface org.cloudburstmc.api.blockentity.BlockEntity
      Specified by:
      isValid in class BaseBlockEntity
    • init

      protected void init()
      Overrides:
      init in class BaseBlockEntity
    • loadAdditionalData

      public void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)
      Overrides:
      loadAdditionalData in class BaseBlockEntity
    • saveAdditionalData

      public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)
      Overrides:
      saveAdditionalData in class BaseBlockEntity
    • onBreak

      public void onBreak()
      Specified by:
      onBreak in interface org.cloudburstmc.api.blockentity.BlockEntity
      Overrides:
      onBreak in class BaseBlockEntity
    • hasBook

      public boolean hasBook()
      Specified by:
      hasBook in interface org.cloudburstmc.api.blockentity.Lectern
    • getBook

      @Nullable public org.cloudburstmc.api.item.ItemStack getBook()
      Specified by:
      getBook in interface org.cloudburstmc.api.blockentity.Lectern
    • setBook

      public void setBook(org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      setBook in interface org.cloudburstmc.api.blockentity.Lectern
    • getLeftPage

      public int getLeftPage()
    • setLeftPage

      public void setLeftPage(int newLeftPage)
    • getRightPage

      public int getRightPage()
    • setRightPage

      public void setRightPage(int newRightPage)
    • getPage

      public int getPage()
      Specified by:
      getPage in interface org.cloudburstmc.api.blockentity.Lectern
    • setPage

      public void setPage(@Nonnegative int page)
      Specified by:
      setPage in interface org.cloudburstmc.api.blockentity.Lectern
    • getTotalPages

      public int getTotalPages()
      Specified by:
      getTotalPages in interface org.cloudburstmc.api.blockentity.Lectern
    • isSpawnable

      public boolean isSpawnable()
      Specified by:
      isSpawnable in interface org.cloudburstmc.api.blockentity.BlockEntity
      Overrides:
      isSpawnable in class BaseBlockEntity