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, HandSlot handSlot, BedrockItem itemInHand, Position3f playerPosition, Position3f clickPosition)
extends Record
implements InventoryTransactionData
-
Nested Class Summary
Nested classes/interfaces inherited from interface InventoryTransactionData
InventoryTransactionData.MismatchTransactionData, InventoryTransactionData.NormalTransactionData, InventoryTransactionData.ReleaseItemTransactionData, InventoryTransactionData.UseItemOnEntityTransactionData, InventoryTransactionData.UseItemTransactionData -
Constructor Summary
ConstructorsConstructorDescriptionUseItemOnEntityTransactionData(long entityRuntimeId, ItemUseOnActorActionType actionType, int hotbarSlot, HandSlot handSlot, 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.handSlot()Returns the value of thehandSlotrecord component.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, HandSlot handSlot, 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 componenthandSlot- the value for thehandSlotrecord componentitemInHand- the value for theitemInHandrecord componentplayerPosition- the value for theplayerPositionrecord componentclickPosition- the value for theclickPositionrecord component
-
-
Method Details
-
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. -
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
-
handSlot
Returns the value of thehandSlotrecord component.- Returns:
- the value of the
handSlotrecord 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
-