Record Class BiomeSpawnCondition

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

public record BiomeSpawnCondition(RegistryEntryList<Biome> requiredBiomes) extends Record implements SpawnCondition
Mappings:
Namespace Name
named net/minecraft/entity/spawn/BiomeSpawnCondition
intermediary net/minecraft/class_10692
official cwt
named requiredBiomes
intermediary comp_3571
official c
  • Field Details

    • requiredBiomes

      private final RegistryEntryList<Biome> requiredBiomes
      The field for the requiredBiomes record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<BiomeSpawnCondition> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/entity/spawn/BiomeSpawnCondition;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_56281 Lnet/minecraft/class_10692;field_56281:Lcom/mojang/serialization/MapCodec;
      official a Lcwt;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

  • Method Details

    • test

      public boolean test(SpawnContext spawnContext)
      Specified by:
      test in interface Predicate<SpawnContext>
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/entity/spawn/BiomeSpawnCondition;test(Lnet/minecraft/entity/spawn/SpawnContext;)Z
      intermediary method_67153 Lnet/minecraft/class_10692;method_67153(Lnet/minecraft/class_10701;)Z
      official a Lcwt;a(Lcwz;)Z
    • getCodec

      public com.mojang.serialization.MapCodec<BiomeSpawnCondition> 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 Lcwx;a()Lcom/mojang/serialization/MapCodec;
    • 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. 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.
    • requiredBiomes

      public RegistryEntryList<Biome> requiredBiomes()
      Returns the value of the requiredBiomes record component.
      Returns:
      the value of the requiredBiomes record component