Class WrittenBookHelpers
java.lang.Object
com.hammy275.immersivemc.client.immersive.book.WrittenBookHelpers
Some helpers used with both the written book Immersive and the lectern Immersive.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addInteractablesForThisTick
(WrittenBookDataHolder dataHolder, PosRot bookPosRot, boolean isLeft) Add interactables for text interactions for this tick.static ClientBookData
makeClientBookData
(WrittenBookDataHolder dataHolder) Make aClientBookData
with included renderable for book text.
-
Constructor Details
-
WrittenBookHelpers
public WrittenBookHelpers()
-
-
Method Details
-
makeClientBookData
Make aClientBookData
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 byWrittenBookDataHolder.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.
-