Record Class DimensionType.MonsterSettings

java.lang.Object
java.lang.Record
net.minecraft.world.level.dimension.DimensionType.MonsterSettings
Enclosing class:
DimensionType

public static record DimensionType.MonsterSettings(boolean piglinSafe, boolean hasRaids, IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<DimensionType.MonsterSettings>
     
    private final boolean
    The field for the hasRaids record component.
    private final int
    The field for the monsterSpawnBlockLightLimit record component.
    private final IntProvider
    The field for the monsterSpawnLightTest record component.
    private final boolean
    The field for the piglinSafe record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MonsterSettings(boolean piglinSafe, boolean hasRaids, IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit)
    Creates an instance of a MonsterSettings record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the hasRaids record component.
    int
    Returns the value of the monsterSpawnBlockLightLimit record component.
    Returns the value of the monsterSpawnLightTest record component.
    boolean
    Returns the value of the piglinSafe record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • piglinSafe

      private final boolean piglinSafe
      The field for the piglinSafe record component.
    • hasRaids

      private final boolean hasRaids
      The field for the hasRaids record component.
    • monsterSpawnLightTest

      private final IntProvider monsterSpawnLightTest
      The field for the monsterSpawnLightTest record component.
    • monsterSpawnBlockLightLimit

      private final int monsterSpawnBlockLightLimit
      The field for the monsterSpawnBlockLightLimit record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<DimensionType.MonsterSettings> CODEC
  • Constructor Details

    • MonsterSettings

      public MonsterSettings(boolean piglinSafe, boolean hasRaids, IntProvider monsterSpawnLightTest, int monsterSpawnBlockLightLimit)
      Creates an instance of a MonsterSettings record class.
      Parameters:
      piglinSafe - the value for the piglinSafe record component
      hasRaids - the value for the hasRaids record component
      monsterSpawnLightTest - the value for the monsterSpawnLightTest record component
      monsterSpawnBlockLightLimit - the value for the monsterSpawnBlockLightLimit record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • piglinSafe

      public boolean piglinSafe()
      Returns the value of the piglinSafe record component.
      Returns:
      the value of the piglinSafe record component
    • hasRaids

      public boolean hasRaids()
      Returns the value of the hasRaids record component.
      Returns:
      the value of the hasRaids record component
    • monsterSpawnLightTest

      public IntProvider monsterSpawnLightTest()
      Returns the value of the monsterSpawnLightTest record component.
      Returns:
      the value of the monsterSpawnLightTest record component
    • monsterSpawnBlockLightLimit

      public int monsterSpawnBlockLightLimit()
      Returns the value of the monsterSpawnBlockLightLimit record component.
      Returns:
      the value of the monsterSpawnBlockLightLimit record component