Class ClientBookData
java.lang.Object
com.hammy275.immersivemc.common.immersive.storage.network.impl.BookData
com.hammy275.immersivemc.client.immersive_item.info.ClientBookData
- All Implemented Interfaces:
NetworkStorage
,WorldStorage
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionnet.minecraft.world.item.ItemStack
static final net.minecraft.client.model.BookModel
net.minecraft.network.chat.FormattedText
net.minecraft.network.chat.FormattedText
int[]
static final net.minecraft.resources.ResourceLocation
Fields inherited from class com.hammy275.immersivemc.common.immersive.storage.network.impl.BookData
authoritative, lecternPosRot, leftPageIndex, leftPageRot, leftPageTurn, linesPerPage, pageChangeState, pageHalfHeight, pageTilt, pageTurnBoxes, pageTurner, pageTurnerIndex, pixelsPerLine, pos, positions, rightPageTurn, scaleSize, singlePageWidth, textInteractDistanceSqr, textStackScaleSize, textUpAmount
-
Constructor Summary
ConstructorDescriptionClientBookData
(boolean authoritative) ClientBookData
(boolean authoritative, net.minecraft.world.item.ItemStack book) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addClickableStyle
(List<net.minecraft.world.phys.Vec3> positions, net.minecraft.network.chat.Style style, double length, PosRot hand, boolean isLeft) boolean
doPageInteract
(int selectedIndex) void
doPageInteract
(ClientBookData.BookClickInfo clickInfo) protected int
void
processFromNetwork
(BookData data) void
protected void
renderPage
(com.mojang.blaze3d.vertex.PoseStack stack, PosRot hand, net.minecraft.network.chat.FormattedText textRaw, boolean leftPage) protected void
setClickPositions
(PosRot hand, boolean isLeft) void
Methods inherited from class com.hammy275.immersivemc.common.immersive.storage.network.impl.BookData
decode, encode, getAway, getHandler, getLeftPageIndex, getLeftRight, getRightPageIndex, isDirty, lastPage, lecternPlayerTick, lecternServerTick, load, markNoLongerDirty, maxLeftPageIndex, maybeConvertToNonVR, nextPage, onFirstPage, onLastPage, possiblyBeginPageTurn, resetTurnState, save, setDirty, setPage, startPageTurn, startPageTurnAnim
-
Field Details
-
bookModel
public static final net.minecraft.client.model.BookModel bookModel -
writtenBookTexture
public static final net.minecraft.resources.ResourceLocation writtenBookTexture -
left
public net.minecraft.network.chat.FormattedText left -
right
public net.minecraft.network.chat.FormattedText right -
clickInfos
-
selectedClickInfos
public int[] selectedClickInfos -
book
public net.minecraft.world.item.ItemStack book
-
-
Constructor Details
-
ClientBookData
public ClientBookData(boolean authoritative) -
ClientBookData
public ClientBookData(boolean authoritative, net.minecraft.world.item.ItemStack book)
-
-
Method Details
-
processFromNetwork
-
getClickBoxes
-
getPageCount
protected int getPageCount()- Overrides:
getPageCount
in classBookData
-
render
-
renderPage
protected void renderPage(com.mojang.blaze3d.vertex.PoseStack stack, PosRot hand, net.minecraft.network.chat.FormattedText textRaw, boolean leftPage) -
tick
-
doPageInteract
public boolean doPageInteract(int selectedIndex) -
doPageInteract
-
setClickPositions
-
addClickableStyle
-