Record Class CauldronInventory.Attributes
java.lang.Object
java.lang.Record
com.beansgalaxy.backpacks.inventory.CauldronInventory.Attributes
- Enclosing class:
- CauldronInventory
public static record CauldronInventory.Attributes(net.minecraft.world.item.Item bucket, BucketsAccess access, int amount, int amountToPlace)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionAttributes(net.minecraft.world.item.Item bucket, BucketsAccess access, int amount, int amountToPlace) Creates an instance of aAttributesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccess()Returns the value of theaccessrecord component.intamount()Returns the value of theamountrecord component.intReturns the value of theamountToPlacerecord component.net.minecraft.world.item.Itembucket()Returns the value of thebucketrecord component.static CauldronInventory.Attributescreate(net.minecraft.world.item.ItemStack cauldron) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Attributes
public Attributes(net.minecraft.world.item.Item bucket, BucketsAccess access, int amount, int amountToPlace) Creates an instance of aAttributesrecord class.- Parameters:
bucket- the value for thebucketrecord componentaccess- the value for theaccessrecord componentamount- the value for theamountrecord componentamountToPlace- the value for theamountToPlacerecord component
-
-
Method Details
-
create
-
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 '=='. -
bucket
public net.minecraft.world.item.Item bucket()Returns the value of thebucketrecord component.- Returns:
- the value of the
bucketrecord component
-
access
Returns the value of theaccessrecord component.- Returns:
- the value of the
accessrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
amountToPlace
public int amountToPlace()Returns the value of theamountToPlacerecord component.- Returns:
- the value of the
amountToPlacerecord component
-