Record Class SpawnParticlesEnchantmentEffect.PositionSource
java.lang.Object
java.lang.Record
net.minecraft.enchantment.effect.entity.SpawnParticlesEnchantmentEffect.PositionSource
- Record Components:
type-offset-scale-
- Enclosing class:
SpawnParticlesEnchantmentEffect
public static record SpawnParticlesEnchantmentEffect.PositionSource(SpawnParticlesEnchantmentEffect.PositionSourceType type, float offset, float scale)
extends Record
- Mappings:
Namespace Name named net/minecraft/enchantment/effect/entity/SpawnParticlesEnchantmentEffect$PositionSourceintermediary net/minecraft/class_9734$class_9735official dbf$anamed typeintermediary comp_2757official bnamed offsetintermediary comp_2758official cnamed scaleintermediary comp_2759official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SpawnParticlesEnchantmentEffect.PositionSource> private final floatThe field for theoffsetrecord component.private final floatThe field for thescalerecord component.private final SpawnParticlesEnchantmentEffect.PositionSourceTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPositionSource(SpawnParticlesEnchantmentEffect.PositionSourceType positionSourceType, float float2, float float3) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doublegetPosition(double entityPosition, double boundingBoxCenter, float boundingBoxSize, Random random) final inthashCode()Returns a hash code value for this object.floatoffset()Returns the value of theoffsetrecord component.floatscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
offset
private final float offsetThe field for theoffsetrecord component. -
scale
private final float scaleThe field for thescalerecord component. -
CODEC
public static final com.mojang.serialization.MapCodec<SpawnParticlesEnchantmentEffect.PositionSource> CODEC- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/enchantment/effect/entity/SpawnParticlesEnchantmentEffect$PositionSource;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_51722Lnet/minecraft/class_9734$class_9735;field_51722:Lcom/mojang/serialization/MapCodec;official aLdbf$a;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
PositionSource
public PositionSource(SpawnParticlesEnchantmentEffect.PositionSourceType positionSourceType, float float2, float float3)
-
-
Method Details
-
getPosition
public double getPosition(double entityPosition, double boundingBoxCenter, float boundingBoxSize, Random random) - Mappings:
Namespace Name Mixin selector named getPositionLnet/minecraft/enchantment/effect/entity/SpawnParticlesEnchantmentEffect$PositionSource;getPosition(DDFLnet/minecraft/util/math/random/Random;)Dintermediary method_60254Lnet/minecraft/class_9734$class_9735;method_60254(DDFLnet/minecraft/class_5819;)Dofficial aLdbf$a;a(DDFLayw;)D
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
offset
public float offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-