Class BagInfo.RenderState
java.lang.Object
com.hammy275.immersivemc.client.immersive.info.BagInfo.RenderState
- All Implemented Interfaces:
ImmersiveRenderState
- Enclosing class:
BagInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionintfloatfloatfloatList<net.minecraft.world.item.ItemStack> booleanintbooleannet.minecraft.world.phys.Vec3intlong -
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
-
hitboxes
-
items
-
light
public int light -
renderPos
public net.minecraft.world.phys.Vec3 renderPos -
handPitch
public float handPitch -
handYaw
public float handYaw -
handRoll
public float handRoll -
argb
public int argb -
tickCount
public long tickCount -
slotHovered
public int slotHovered -
ownedByLocalPlayer
public boolean ownedByLocalPlayer -
leftHanded
public boolean leftHanded -
dragHitbox
-
-
Constructor Details
-
RenderState
public RenderState()
-
-
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.
-