Record Class VanillaBlockCodecs.ParticleLeaves
java.lang.Object
java.lang.Record
net.rebel459.unified.api.registry.VanillaBlockCodecs.ParticleLeaves
- Enclosing class:
VanillaBlockCodecs
public static record VanillaBlockCodecs.ParticleLeaves(float chance, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayer player)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VanillaBlockCodecs.ParticleLeaves> -
Constructor Summary
ConstructorsConstructorDescriptionParticleLeaves(float chance, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayer player) Creates an instance of aParticleLeavesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatchance()Returns the value of thechancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.core.particles.ParticleOptionsparticle()Returns the value of theparticlerecord component.net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayerplayer()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ParticleLeaves
public ParticleLeaves(float chance, net.minecraft.core.particles.ParticleOptions particle, net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayer player) Creates an instance of aParticleLeavesrecord class.- Parameters:
chance- the value for thechancerecord componentparticle- the value for theparticlerecord componentplayer- the value for theplayerrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
chance
public float chance()Returns the value of thechancerecord component.- Returns:
- the value of the
chancerecord component
-
particle
public net.minecraft.core.particles.ParticleOptions particle()Returns the value of theparticlerecord component.- Returns:
- the value of the
particlerecord component
-
player
public net.minecraft.world.level.block.sounds.AmbientLeavesBlockSoundPlayer player()Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-