Class AbstractImmersiveRenderState
java.lang.Object
com.hammy275.immersivemc.client.immersive.info.render_state.AbstractImmersiveRenderState
- All Implemented Interfaces:
ImmersiveRenderState
- Direct Known Subclasses:
BeaconRenderState, ChestRenderState
-
Field Summary
FieldsModifier and TypeFieldDescriptionList<net.minecraft.world.item.ItemStack> net.minecraft.core.BlockPosint[]long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhitboxes()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
-
items
-
pos
public net.minecraft.core.BlockPos pos -
slotsHovered
public int[] slotsHovered -
ticksExisted
public long ticksExisted
-
-
Constructor Details
-
AbstractImmersiveRenderState
public AbstractImmersiveRenderState()
-
-
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.
-
hasHitboxes
public boolean hasHitboxes()
-