Package net.minecraft.world.attribute
Record Class AmbientParticle
java.lang.Object
java.lang.Record
net.minecraft.world.attribute.AmbientParticle
- Record Components:
particle-probability-
- Mappings:
Namespace Name named net/minecraft/world/attribute/AmbientParticleintermediary net/minecraft/class_4761official cdrnamed particleintermediary comp_4993official bnamed probabilityintermediary comp_4994official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<AmbientParticle> private final ParticleEffectThe field for theparticlerecord component.private final floatThe field for theprobabilityrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAmbientParticle(ParticleEffect particle, float probability) Creates an instance of aAmbientParticlerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static List<AmbientParticle> of(ParticleEffect particle, float probability) particle()Returns the value of theparticlerecord component.floatReturns the value of theprobabilityrecord component.booleanshouldAddParticle(Random random) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
particle
The field for theparticlerecord component. -
probability
private final float probabilityThe field for theprobabilityrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/world/attribute/AmbientParticle;CODEC:Lcom/mojang/serialization/Codec;intermediary field_24675Lnet/minecraft/class_4761;field_24675:Lcom/mojang/serialization/Codec;official aLcdr;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
AmbientParticle
Creates an instance of aAmbientParticlerecord class.- Parameters:
particle- the value for theparticlerecord componentprobability- the value for theprobabilityrecord component
-
-
Method Details
-
shouldAddParticle
- Mappings:
Namespace Name Mixin selector named shouldAddParticleLnet/minecraft/world/attribute/AmbientParticle;shouldAddParticle(Lnet/minecraft/util/math/random/Random;)Zintermediary method_24370Lnet/minecraft/class_4761;method_24370(Lnet/minecraft/class_5819;)Zofficial aLcdr;a(Lbgq;)Z
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/world/attribute/AmbientParticle;of(Lnet/minecraft/particle/ParticleEffect;F)Ljava/util/List;intermediary method_75621Lnet/minecraft/class_4761;method_75621(Lnet/minecraft/class_2394;F)Ljava/util/List;official aLcdr;a(Llw;F)Ljava/util/List;
-
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 '=='. -
particle
Returns the value of theparticlerecord component.- Returns:
- the value of the
particlerecord component
-
probability
public float probability()Returns the value of theprobabilityrecord component.- Returns:
- the value of the
probabilityrecord component
-