Class BuiltImmersiveRenderStateImpl<ER>
java.lang.Object
com.hammy275.immersivemc.client.immersive.info.render_state.BuiltImmersiveRenderStateImpl<ER>
- All Implemented Interfaces:
BuiltImmersiveRenderState<ER>, ImmersiveRenderState
public class BuiltImmersiveRenderStateImpl<ER>
extends Object
implements BuiltImmersiveRenderState<ER>
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleannet.minecraft.world.phys.AABBnet.minecraft.core.Directionintnet.minecraft.core.BlockPosint[]long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.BlockPosbooleanhitboxes()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
-
hitboxes
-
pos
public net.minecraft.core.BlockPos pos -
ticksExisted
public long ticksExisted -
airCheckPassed
public boolean airCheckPassed -
light
public int light -
immersiveDir
public net.minecraft.core.Direction immersiveDir -
dragHitbox
public net.minecraft.world.phys.AABB dragHitbox -
extraData
-
slotsHovered
public int[] slotsHovered
-
-
Constructor Details
-
BuiltImmersiveRenderStateImpl
public BuiltImmersiveRenderStateImpl()
-
-
Method Details
-
hasHitboxes
public boolean hasHitboxes() -
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.
-
getBlockPos
public net.minecraft.core.BlockPos getBlockPos()- Specified by:
getBlockPosin interfaceBuiltImmersiveRenderState<ER>- Returns:
- The position of the block this render state represents.
-
getExtraRenderData
- Specified by:
getExtraRenderDatain interfaceBuiltImmersiveRenderState<ER>- Returns:
- The extra render data, or null if no render data class and converter is defined.
-