Record Class MobSpawnerEntry.CustomSpawnRules

java.lang.Object
java.lang.Record
net.minecraft.block.spawner.MobSpawnerEntry.CustomSpawnRules
Record Components:
blockLightLimit -
skyLightLimit -
Enclosing class:
MobSpawnerEntry

public static record MobSpawnerEntry.CustomSpawnRules(Range<Integer> blockLightLimit, Range<Integer> skyLightLimit) extends Record
Mappings:
Namespace Name
named net/minecraft/block/spawner/MobSpawnerEntry$CustomSpawnRules
intermediary net/minecraft/class_1952$class_6542
official dib$a
named blockLightLimit
intermediary comp_66
official b
named skyLightLimit
intermediary comp_67
official c
  • Field Details

    • blockLightLimit

      private final Range<Integer> blockLightLimit
      The field for the blockLightLimit record component.
    • skyLightLimit

      private final Range<Integer> skyLightLimit
      The field for the skyLightLimit record component.
    • DEFAULT

      private static final Range<Integer> DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/block/spawner/MobSpawnerEntry$CustomSpawnRules;DEFAULT:Lnet/minecraft/util/dynamic/Range;
      intermediary field_34463 Lnet/minecraft/class_1952$class_6542;field_34463:Lnet/minecraft/class_6497;
      official d Ldib$a;d:Lazw;
    • CODEC

      public static final com.mojang.serialization.Codec<MobSpawnerEntry.CustomSpawnRules> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/block/spawner/MobSpawnerEntry$CustomSpawnRules;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_34462 Lnet/minecraft/class_1952$class_6542;field_34462:Lcom/mojang/serialization/Codec;
      official a Ldib$a;a:Lcom/mojang/serialization/Codec;
  • Constructor Details

  • Method Details

    • validate

      private static com.mojang.serialization.DataResult<Range<Integer>> validate(Range<Integer> provider)
      Mappings:
      Namespace Name Mixin selector
      named validate Lnet/minecraft/block/spawner/MobSpawnerEntry$CustomSpawnRules;validate(Lnet/minecraft/util/dynamic/Range;)Lcom/mojang/serialization/DataResult;
      intermediary method_38099 Lnet/minecraft/class_1952$class_6542;method_38099(Lnet/minecraft/class_6497;)Lcom/mojang/serialization/DataResult;
      official a Ldib$a;a(Lazw;)Lcom/mojang/serialization/DataResult;
    • createLightLimitCodec

      private static com.mojang.serialization.MapCodec<Range<Integer>> createLightLimitCodec(String name)
      Mappings:
      Namespace Name Mixin selector
      named createLightLimitCodec Lnet/minecraft/block/spawner/MobSpawnerEntry$CustomSpawnRules;createLightLimitCodec(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
      intermediary method_51719 Lnet/minecraft/class_1952$class_6542;method_51719(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
      official a Ldib$a;a(Ljava/lang/String;)Lcom/mojang/serialization/MapCodec;
    • canSpawn

      public boolean canSpawn(BlockPos pos, ServerWorld world)
      Mappings:
      Namespace Name Mixin selector
      named canSpawn Lnet/minecraft/block/spawner/MobSpawnerEntry$CustomSpawnRules;canSpawn(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/server/world/ServerWorld;)Z
      intermediary method_56563 Lnet/minecraft/class_1952$class_6542;method_56563(Lnet/minecraft/class_2338;Lnet/minecraft/class_3218;)Z
      official a Ldib$a;a(Ljh;Lash;)Z
    • 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockLightLimit

      public Range<Integer> blockLightLimit()
      Returns the value of the blockLightLimit record component.
      Returns:
      the value of the blockLightLimit record component
    • skyLightLimit

      public Range<Integer> skyLightLimit()
      Returns the value of the skyLightLimit record component.
      Returns:
      the value of the skyLightLimit record component