Class LecternRenderState
java.lang.Object
com.hammy275.immersivemc.client.immersive.info.render_state.LecternRenderState
- All Implemented Interfaces:
ImmersiveRenderState
-
Field Summary
FieldsModifier and TypeFieldDescriptionnet.minecraft.world.item.ItemStackfinal BookDataRenderStateintlong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhitboxes()Gets the list of all hitboxes for interaction, this interface's counterpart toImmersiveInfo.getAllHitboxes().booleanisSlotHovered(int slot) Gets whether the provided slot (index intoImmersiveRenderState.hitboxes()) is currently hovered.longGets the amount of ticks the info this render state comes from has existed, this interface's counterpart toImmersiveInfo.getTicksExisted().
-
Field Details
-
book
public net.minecraft.world.item.ItemStack book -
bookData
-
posRot
-
light
public int light -
ticksExisted
public long ticksExisted
-
-
Constructor Details
-
LecternRenderState
public LecternRenderState()
-
-
Method Details
-
hitboxes
Description copied from interface:ImmersiveRenderStateGets the list of all hitboxes for interaction, this interface's counterpart toImmersiveInfo.getAllHitboxes(). Like its counterpart, the list can contain null elements.For Immersives that have hitboxes
- Specified by:
hitboxesin interfaceImmersiveRenderState- Returns:
- A list of all bounding boxes indexed by their slot number.
-
ticksExisted
public long ticksExisted()Description copied from interface:ImmersiveRenderStateGets the amount of ticks the info this render state comes from has existed, this interface's counterpart toImmersiveInfo.getTicksExisted().- Specified by:
ticksExistedin interfaceImmersiveRenderState- Returns:
- The amount of ticks the ImmersiveInfo this render state came from has existed.
-
isSlotHovered
public boolean isSlotHovered(int slot) Description copied from interface:ImmersiveRenderStateGets whether the provided slot (index intoImmersiveRenderState.hitboxes()) is currently hovered. This is similar toImmersiveInfo.getSlotHovered(int), but this function gets the slot and returns whether that slot is hovered, whereasImmersiveInfo.getSlotHovered(int)gets the hand index and returns the hovered slot.- Specified by:
isSlotHoveredin interfaceImmersiveRenderState- Parameters:
slot- The slot/index intoImmersiveRenderState.hitboxes()that is checked if it's hovered.- Returns:
- Whether the aforementioned slot is hovered.
-