Record Class BedrockItemAnimation.Use
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.appearance.BedrockItemAnimation.Use
- Enclosing class:
BedrockItemAnimation
public static record BedrockItemAnimation.Use(BedrockItemAnimation.Item activeItem, BedrockItemAnimation.Item mainHand, int remainingTicks, BedrockItemAnimation.Action mainHandAction)
extends Record
The native player keeps the active use stack separate from its equipped hands.
-
Constructor Summary
ConstructorsConstructorDescriptionUse(BedrockItemAnimation.Item activeItem, BedrockItemAnimation.Item mainHand, int remainingTicks, BedrockItemAnimation.Action mainHandAction) Creates an instance of aUserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveItemrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mainHand()Returns the value of themainHandrecord component.Returns the value of themainHandActionrecord component.intReturns the value of theremainingTicksrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Use
public Use(BedrockItemAnimation.Item activeItem, BedrockItemAnimation.Item mainHand, int remainingTicks, BedrockItemAnimation.Action mainHandAction) Creates an instance of aUserecord class.- Parameters:
activeItem- the value for theactiveItemrecord componentmainHand- the value for themainHandrecord componentremainingTicks- the value for theremainingTicksrecord componentmainHandAction- the value for themainHandActionrecord component
-
-
Method Details
-
variables
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
activeItem
Returns the value of theactiveItemrecord component.- Returns:
- the value of the
activeItemrecord component
-
mainHand
Returns the value of themainHandrecord component.- Returns:
- the value of the
mainHandrecord component
-
remainingTicks
public int remainingTicks()Returns the value of theremainingTicksrecord component.- Returns:
- the value of the
remainingTicksrecord component
-
mainHandAction
Returns the value of themainHandActionrecord component.- Returns:
- the value of the
mainHandActionrecord component
-