Record Class MoonBrightnessSpawnCondition

java.lang.Object
java.lang.Record
net.minecraft.entity.spawn.MoonBrightnessSpawnCondition
Record Components:
range -
All Implemented Interfaces:
Predicate<SpawnContext>, SpawnCondition, VariantSelectorProvider.SelectorCondition<SpawnContext>

public record MoonBrightnessSpawnCondition(NumberRange.DoubleRange range) extends Record implements SpawnCondition
Mappings:
Namespace Name
named net/minecraft/entity/spawn/MoonBrightnessSpawnCondition
intermediary net/minecraft/class_10694
official cuk
named range
intermediary comp_3574
official c
  • Field Details Link icon

    • range Link icon

      private final NumberRange.DoubleRange range
      The field for the range record component.
    • CODEC Link icon

      public static final com.mojang.serialization.MapCodec<MoonBrightnessSpawnCondition> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/entity/spawn/MoonBrightnessSpawnCondition;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_56282 Lnet/minecraft/class_10694;field_56282:Lcom/mojang/serialization/MapCodec;
      official a Lcuk;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details Link icon

  • Method Details Link icon

    • test Link icon

      public boolean test(SpawnContext spawnContext)
      Specified by:
      test in interface Predicate<SpawnContext>
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/entity/spawn/MoonBrightnessSpawnCondition;test(Lnet/minecraft/entity/spawn/SpawnContext;)Z
      intermediary method_67158 Lnet/minecraft/class_10694;method_67158(Lnet/minecraft/class_10701;)Z
      official a Lcuk;a(Lcuo;)Z
    • getCodec Link icon

      public com.mojang.serialization.MapCodec<MoonBrightnessSpawnCondition> getCodec()
      Specified by:
      getCodec in interface SpawnCondition
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/entity/spawn/SpawnCondition;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_67151 Lnet/minecraft/class_10699;method_67151()Lcom/mojang/serialization/MapCodec;
      official a Lcum;a()Lcom/mojang/serialization/MapCodec;
    • toString Link icon

      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 Link icon

      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 Link icon

      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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • range Link icon

      public NumberRange.DoubleRange range()
      Returns the value of the range record component.
      Returns:
      the value of the range record component