Record Class SwapTracker.LastImmersive<I extends ImmersiveInfo>
java.lang.Object
java.lang.Record
com.hammy275.immersivemc.client.immersive.SwapTracker.LastImmersive<I>
- Enclosing class:
SwapTracker
protected static record SwapTracker.LastImmersive<I extends ImmersiveInfo>(Immersive<I extends ImmersiveInfo,?> immersive, I extends ImmersiveInfo info)
extends Record
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LastImmersive
(Immersive<I, ?> immersive, I info) Creates an instance of aLastImmersive
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
doHitboxInteract
(List<Integer> slots, net.minecraft.world.InteractionHand hand, int currentCooldown, boolean leftClickDown) boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theimmersive
record component.info()
Returns the value of theinfo
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LastImmersive
Creates an instance of aLastImmersive
record class.- Parameters:
immersive
- the value for theimmersive
record componentinfo
- the value for theinfo
record component
-
-
Method Details
-
doHitboxInteract
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
immersive
Returns the value of theimmersive
record component.- Returns:
- the value of the
immersive
record component
-
info
Returns the value of theinfo
record component.- Returns:
- the value of the
info
record component
-