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$PositionSource
intermediary net/minecraft/class_9734$class_9735
official dbf$a
named type
intermediary comp_2757
official b
named offset
intermediary comp_2758
official c
named scale
intermediary comp_2759
official d
  • Field Details

    • type

      The field for the type record component.
    • offset

      private final float offset
      The field for the offset record component.
    • scale

      private final float scale
      The field for the scale record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<SpawnParticlesEnchantmentEffect.PositionSource> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/enchantment/effect/entity/SpawnParticlesEnchantmentEffect$PositionSource;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_51722 Lnet/minecraft/class_9734$class_9735;field_51722:Lcom/mojang/serialization/MapCodec;
      official a Ldbf$a;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • getPosition

      public double getPosition(double entityPosition, double boundingBoxCenter, float boundingBoxSize, Random random)
      Mappings:
      Namespace Name Mixin selector
      named getPosition Lnet/minecraft/enchantment/effect/entity/SpawnParticlesEnchantmentEffect$PositionSource;getPosition(DDFLnet/minecraft/util/math/random/Random;)D
      intermediary method_60254 Lnet/minecraft/class_9734$class_9735;method_60254(DDFLnet/minecraft/class_5819;)D
      official a Ldbf$a;a(DDFLayw;)D
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • offset

      public float offset()
      Returns the value of the offset record component.
      Returns:
      the value of the offset record component
    • scale

      public float scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component