Record Class ItemStackRequestAction.TakeAction
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.inventory.ItemStackRequestAction.TakeAction
- All Implemented Interfaces:
ItemStackRequestAction
- Enclosing interface:
- ItemStackRequestAction
public static record ItemStackRequestAction.TakeAction(int count, ItemStackRequestSlotInfo source, ItemStackRequestSlotInfo destination)
extends Record
implements ItemStackRequestAction
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.raphimc.viabedrock.protocol.model.inventory.ItemStackRequestAction
ItemStackRequestAction.BeaconPaymentAction, ItemStackRequestAction.ConsumeAction, ItemStackRequestAction.CraftRecipeAction, ItemStackRequestAction.CraftRecipeOptionalAction, ItemStackRequestAction.CraftResultsDeprecatedAction, ItemStackRequestAction.DestroyAction, ItemStackRequestAction.DropAction, ItemStackRequestAction.MineBlockAction, ItemStackRequestAction.PlaceAction, ItemStackRequestAction.SwapAction, ItemStackRequestAction.TakeAction -
Constructor Summary
ConstructorsConstructorDescriptionTakeAction(int count, ItemStackRequestSlotInfo source, ItemStackRequestSlotInfo destination) Creates an instance of aTakeActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcount()Returns the value of thecountrecord component.Returns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TakeAction
Creates an instance of aTakeActionrecord class.- Parameters:
count- the value for thecountrecord componentsource- the value for thesourcerecord componentdestination- the value for thedestinationrecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceItemStackRequestAction
-
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 '=='. -
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-