Package de.cech12.bucketlib.util
Record Class RegistryUtil.BucketEntity
java.lang.Object
java.lang.Record
de.cech12.bucketlib.util.RegistryUtil.BucketEntity
- Enclosing class:
RegistryUtil
public static record RegistryUtil.BucketEntity(net.minecraft.world.entity.EntityType<?> entityType, net.minecraft.world.level.material.Fluid fluid, net.minecraft.world.item.MobBucketItem bucketItem)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBucketEntity(net.minecraft.world.entity.EntityType<?> entityType, net.minecraft.world.level.material.Fluid fluid, net.minecraft.world.item.MobBucketItem bucketItem) Creates an instance of aBucketEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.MobBucketItemReturns the value of thebucketItemrecord component.net.minecraft.world.entity.EntityType<?> Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.material.Fluidfluid()Returns the value of thefluidrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BucketEntity
public BucketEntity(net.minecraft.world.entity.EntityType<?> entityType, net.minecraft.world.level.material.Fluid fluid, net.minecraft.world.item.MobBucketItem bucketItem) Creates an instance of aBucketEntityrecord class.- Parameters:
entityType- the value for theentityTyperecord componentfluid- the value for thefluidrecord componentbucketItem- the value for thebucketItemrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
entityType
public net.minecraft.world.entity.EntityType<?> entityType()Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
fluid
public net.minecraft.world.level.material.Fluid fluid()Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-
bucketItem
public net.minecraft.world.item.MobBucketItem bucketItem()Returns the value of thebucketItemrecord component.- Returns:
- the value of the
bucketItemrecord component
-