Class LecternContainer


public class LecternContainer extends Container
  • Constructor Details

  • Method Details

    • setItem

      public void setItem(int slot, @NonNull GeyserItemStack newItem, GeyserSession session)
      When the Java server asks the client to open a book in their hotbar, we create a fake lectern to show it to the client. We can't use the Container.isUsingRealBlock() check as we may also be dealing with a real virtual lectern (with its own inventory).
      Overrides:
      setItem in class Container
    • setFakeLecternBook

      public void setFakeLecternBook(GeyserItemStack book, GeyserSession session)
      This is used ONLY once to set the book of a fake lectern in JavaOpenBookTranslator. See setItem(int, GeyserItemStack, GeyserSession) as for why this is separate.
    • shouldConfirmContainerClose

      public boolean shouldConfirmContainerClose()
      Description copied from class: Inventory
      Whether we should be sending a ServerboundContainerClosePacket when closing the inventory.
      Overrides:
      shouldConfirmContainerClose in class Inventory
    • getCurrentBedrockPage

      public int getCurrentBedrockPage()
    • getBlockEntityTag

      public org.cloudburstmc.nbt.NbtMap getBlockEntityTag()
    • getPosition

      public org.cloudburstmc.math.vector.Vector3i getPosition()
    • isBookInPlayerInventory

      public boolean isBookInPlayerInventory()
    • setCurrentBedrockPage

      public void setCurrentBedrockPage(int currentBedrockPage)
    • setBlockEntityTag

      public void setBlockEntityTag(org.cloudburstmc.nbt.NbtMap blockEntityTag)
    • setPosition

      public void setPosition(org.cloudburstmc.math.vector.Vector3i position)