Record Class PlayerInventoryWrapper.DroppedItems.DropInfo
java.lang.Object
java.lang.Record
net.neoforged.neoforge.transfer.item.PlayerInventoryWrapper.DroppedItems.DropInfo
- Enclosing class:
PlayerInventoryWrapper.DroppedItems
private static record PlayerInventoryWrapper.DroppedItems.DropInfo(ItemResource resource, int amount, boolean dropAround, Prediction prediction)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theamountrecord component.private final booleanThe field for thedropAroundrecord component.private final PredictionThe field for thepredictionrecord component.private final ItemResourceThe field for theresourcerecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDropInfo(ItemResource resource, int amount, boolean dropAround, Prediction prediction) Creates an instance of aDropInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.booleanReturns the value of thedropAroundrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepredictionrecord component.resource()Returns the value of theresourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
resource
The field for theresourcerecord component. -
amount
private final int amountThe field for theamountrecord component. -
dropAround
private final boolean dropAroundThe field for thedropAroundrecord component. -
prediction
The field for thepredictionrecord component.
-
-
Constructor Details
-
DropInfo
Creates an instance of aDropInforecord class.- Parameters:
resource- the value for theresourcerecord componentamount- the value for theamountrecord componentdropAround- the value for thedropAroundrecord componentprediction- the value for thepredictionrecord 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. -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
dropAround
public boolean dropAround()Returns the value of thedropAroundrecord component.- Returns:
- the value of the
dropAroundrecord component
-
prediction
Returns the value of thepredictionrecord component.- Returns:
- the value of the
predictionrecord component
-