Record Class InventoryTransactionData.UseItemOnEntityTransactionData
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.inventory.InventoryTransactionData.UseItemOnEntityTransactionData
- All Implemented Interfaces:
InventoryTransactionData
- Enclosing interface:
- InventoryTransactionData
public static record InventoryTransactionData.UseItemOnEntityTransactionData(long entityRuntimeId, ItemUseOnActorActionType actionType, int hotbarSlot, BedrockItem itemInHand, Position3f playerPosition, Position3f clickPosition)
extends Record
implements InventoryTransactionData
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.raphimc.viabedrock.protocol.model.inventory.InventoryTransactionData
InventoryTransactionData.MismatchTransactionData, InventoryTransactionData.NormalTransactionData, InventoryTransactionData.ReleaseItemTransactionData, InventoryTransactionData.UseItemOnEntityTransactionData, InventoryTransactionData.UseItemTransactionData -
Constructor Summary
ConstructorsConstructorDescriptionUseItemOnEntityTransactionData(long entityRuntimeId, ItemUseOnActorActionType actionType, int hotbarSlot, BedrockItem itemInHand, Position3f playerPosition, Position3f clickPosition) Creates an instance of aUseItemOnEntityTransactionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionTyperecord component.Returns the value of theclickPositionrecord component.longReturns the value of theentityRuntimeIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehotbarSlotrecord component.Returns the value of theitemInHandrecord component.Returns the value of theplayerPositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UseItemOnEntityTransactionData
public UseItemOnEntityTransactionData(long entityRuntimeId, ItemUseOnActorActionType actionType, int hotbarSlot, BedrockItem itemInHand, Position3f playerPosition, Position3f clickPosition) Creates an instance of aUseItemOnEntityTransactionDatarecord class.- Parameters:
entityRuntimeId- the value for theentityRuntimeIdrecord componentactionType- the value for theactionTyperecord componenthotbarSlot- the value for thehotbarSlotrecord componentitemInHand- the value for theitemInHandrecord componentplayerPosition- the value for theplayerPositionrecord componentclickPosition- the value for theclickPositionrecord component
-
-
Method Details
-
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. -
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 '=='. -
entityRuntimeId
public long entityRuntimeId()Returns the value of theentityRuntimeIdrecord component.- Returns:
- the value of the
entityRuntimeIdrecord component
-
actionType
Returns the value of theactionTyperecord component.- Returns:
- the value of the
actionTyperecord component
-
hotbarSlot
public int hotbarSlot()Returns the value of thehotbarSlotrecord component.- Returns:
- the value of the
hotbarSlotrecord component
-
itemInHand
Returns the value of theitemInHandrecord component.- Returns:
- the value of the
itemInHandrecord component
-
playerPosition
Returns the value of theplayerPositionrecord component.- Returns:
- the value of the
playerPositionrecord component
-
clickPosition
Returns the value of theclickPositionrecord component.- Returns:
- the value of the
clickPositionrecord component
-