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, boolean includeThrowerName)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theamountrecord component.private final booleanThe field for thedropAroundrecord component.private final booleanThe field for theincludeThrowerNamerecord component.private final ItemResourceThe field for theresourcerecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDropInfo(ItemResource resource, int amount, boolean dropAround, boolean includeThrowerName) 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.booleanReturns the value of theincludeThrowerNamerecord 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. -
includeThrowerName
private final boolean includeThrowerNameThe field for theincludeThrowerNamerecord 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 componentincludeThrowerName- the value for theincludeThrowerNamerecord 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 '=='. -
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
-
includeThrowerName
public boolean includeThrowerName()Returns the value of theincludeThrowerNamerecord component.- Returns:
- the value of the
includeThrowerNamerecord component
-