Record Class VanillaBlockCodecs.Chest
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaBlockCodecs.Chest
- Enclosing class:
VanillaBlockCodecs
public static record VanillaBlockCodecs.Chest(net.minecraft.sounds.SoundEvent openSound, net.minecraft.sounds.SoundEvent closeSound)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VanillaBlockCodecs.Chest> -
Constructor Summary
ConstructorsConstructorDescriptionChest(net.minecraft.sounds.SoundEvent openSound, net.minecraft.sounds.SoundEvent closeSound) Creates an instance of aChestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.sounds.SoundEventReturns the value of thecloseSoundrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.sounds.SoundEventReturns the value of theopenSoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Chest
public Chest(net.minecraft.sounds.SoundEvent openSound, net.minecraft.sounds.SoundEvent closeSound) Creates an instance of aChestrecord class.- Parameters:
openSound- the value for theopenSoundrecord componentcloseSound- the value for thecloseSoundrecord 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). -
openSound
public net.minecraft.sounds.SoundEvent openSound()Returns the value of theopenSoundrecord component.- Returns:
- the value of the
openSoundrecord component
-
closeSound
public net.minecraft.sounds.SoundEvent closeSound()Returns the value of thecloseSoundrecord component.- Returns:
- the value of the
closeSoundrecord component
-