Class WrittenBookHelpers

java.lang.Object
com.hammy275.immersivemc.client.immersive.book.WrittenBookHelpers

public class WrittenBookHelpers extends Object
Some helpers used with both the written book Immersive and the lectern Immersive.
  • Constructor Details

    • WrittenBookHelpers

      public WrittenBookHelpers()
  • Method Details

    • makeClientBookData

      public static ClientBookData makeClientBookData(WrittenBookDataHolder dataHolder)
      Make a ClientBookData with included renderable for book text.
      Parameters:
      dataHolder - Something that has access to the book data being created here, a book, and a callback for handling page changes via book text clicking.
      Returns:
      A ClientBookData that should be returned by WrittenBookDataHolder.getData().
    • addInteractablesForThisTick

      public static void addInteractablesForThisTick(WrittenBookDataHolder dataHolder, PosRot bookPosRot, boolean isLeft)
      Add interactables for text interactions for this tick. The interactables should be cleared before calling this.
      Parameters:
      dataHolder - Something that has access to the book data being created here, a book, and a callback for handling page changes via book text clicking.
      bookPosRot - The PosRot of the book.
      isLeft - Whether to add interactables for the left page or right page.