Package de.Keyle.MyPet.api.skill.skills
Record Class Sniff.DropEntry
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.skill.skills.Sniff.DropEntry
- Record Components:
item- the item droppedweight- its relative chance among the poolamountMin- smallest stack size droppedamountMax- largest stack size dropped
- Enclosing interface:
Sniff
public static record Sniff.DropEntry(ItemStack item, int weight, int amountMin, int amountMax)
extends Record
One weighted drop: a full item and the random stack-size range [amountMin, amountMax].
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theamountMaxrecord component.intReturns the value of theamountMinrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Constructor Details
-
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 '=='. -
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
amountMin
public int amountMin()Returns the value of theamountMinrecord component.- Returns:
- the value of the
amountMinrecord component
-
amountMax
public int amountMax()Returns the value of theamountMaxrecord component.- Returns:
- the value of the
amountMaxrecord component
-