Record Class VanillaItemCodecs.MobBucket
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaItemCodecs.MobBucket
- Enclosing class:
VanillaItemCodecs
public static record VanillaItemCodecs.MobBucket(net.minecraft.world.entity.EntityType<?> entityType, net.minecraft.world.level.material.Fluid fluid, net.minecraft.sounds.SoundEvent emptySound)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VanillaItemCodecs.MobBucket> -
Constructor Summary
ConstructorsConstructorDescriptionMobBucket(net.minecraft.world.entity.EntityType<?> entityType, net.minecraft.world.level.material.Fluid fluid, net.minecraft.sounds.SoundEvent emptySound) Creates an instance of aMobBucketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.sounds.SoundEventReturns the value of theemptySoundrecord 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.
-
Field Details
-
CODEC
-
-
Constructor Details
-
MobBucket
public MobBucket(net.minecraft.world.entity.EntityType<?> entityType, net.minecraft.world.level.material.Fluid fluid, net.minecraft.sounds.SoundEvent emptySound) Creates an instance of aMobBucketrecord class.- Parameters:
entityType- the value for theentityTyperecord componentfluid- the value for thefluidrecord componentemptySound- the value for theemptySoundrecord 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. 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
-
emptySound
public net.minecraft.sounds.SoundEvent emptySound()Returns the value of theemptySoundrecord component.- Returns:
- the value of the
emptySoundrecord component
-