Record Class DimensionType

java.lang.Object
java.lang.Record
net.minecraft.world.level.dimension.DimensionType

public record DimensionType(OptionalLong fixedTime, boolean hasSkyLight, boolean hasCeiling, boolean ultraWarm, boolean natural, double coordinateScale, boolean bedWorks, boolean respawnAnchorWorks, int minY, int height, int logicalHeight, TagKey<Block> infiniburn, ResourceLocation effectsLocation, float ambientLight, DimensionType.MonsterSettings monsterSettings) extends Record
  • Field Details

    • fixedTime

      private final OptionalLong fixedTime
      The field for the fixedTime record component.
    • hasSkyLight

      private final boolean hasSkyLight
      The field for the hasSkyLight record component.
    • hasCeiling

      private final boolean hasCeiling
      The field for the hasCeiling record component.
    • ultraWarm

      private final boolean ultraWarm
      The field for the ultraWarm record component.
    • natural

      private final boolean natural
      The field for the natural record component.
    • coordinateScale

      private final double coordinateScale
      The field for the coordinateScale record component.
    • bedWorks

      private final boolean bedWorks
      The field for the bedWorks record component.
    • respawnAnchorWorks

      private final boolean respawnAnchorWorks
      The field for the respawnAnchorWorks record component.
    • minY

      private final int minY
      The field for the minY record component.
    • height

      private final int height
      The field for the height record component.
    • logicalHeight

      private final int logicalHeight
      The field for the logicalHeight record component.
    • infiniburn

      private final TagKey<Block> infiniburn
      The field for the infiniburn record component.
    • effectsLocation

      private final ResourceLocation effectsLocation
      The field for the effectsLocation record component.
    • ambientLight

      private final float ambientLight
      The field for the ambientLight record component.
    • monsterSettings

      private final DimensionType.MonsterSettings monsterSettings
      The field for the monsterSettings record component.
    • BITS_FOR_Y

      public static final int BITS_FOR_Y
    • MIN_HEIGHT

      public static final int MIN_HEIGHT
      See Also:
    • Y_SIZE

      public static final int Y_SIZE
    • MAX_Y

      public static final int MAX_Y
    • MIN_Y

      public static final int MIN_Y
    • WAY_ABOVE_MAX_Y

      public static final int WAY_ABOVE_MAX_Y
    • WAY_BELOW_MIN_Y

      public static final int WAY_BELOW_MIN_Y
    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<DimensionType> DIRECT_CODEC
    • MOON_PHASES

      private static final int MOON_PHASES
      See Also:
    • MOON_BRIGHTNESS_PER_PHASE

      public static final float[] MOON_BRIGHTNESS_PER_PHASE
    • CODEC

      public static final com.mojang.serialization.Codec<Holder<DimensionType>> CODEC
  • Constructor Details

    • DimensionType

      public DimensionType(OptionalLong fixedTime, boolean hasSkyLight, boolean hasCeiling, boolean ultraWarm, boolean natural, double coordinateScale, boolean bedWorks, boolean respawnAnchorWorks, int minY, int height, int logicalHeight, TagKey<Block> infiniburn, ResourceLocation effectsLocation, float ambientLight, DimensionType.MonsterSettings monsterSettings)
      Creates an instance of a DimensionType record class.
      Parameters:
      fixedTime - the value for the fixedTime record component
      hasSkyLight - the value for the hasSkyLight record component
      hasCeiling - the value for the hasCeiling record component
      ultraWarm - the value for the ultraWarm record component
      natural - the value for the natural record component
      coordinateScale - the value for the coordinateScale record component
      bedWorks - the value for the bedWorks record component
      respawnAnchorWorks - the value for the respawnAnchorWorks record component
      minY - the value for the minY record component
      height - the value for the height record component
      logicalHeight - the value for the logicalHeight record component
      infiniburn - the value for the infiniburn record component
      effectsLocation - the value for the effectsLocation record component
      ambientLight - the value for the ambientLight record component
      monsterSettings - the value for the monsterSettings record component
  • Method Details

    • parseLegacy

      @Deprecated public static com.mojang.serialization.DataResult<ResourceKey<Level>> parseLegacy(com.mojang.serialization.Dynamic<?> p_63912_)
      Deprecated.
    • getTeleportationScale

      public static double getTeleportationScale(DimensionType p_63909_, DimensionType p_63910_)
    • getStorageFolder

      public static Path getStorageFolder(ResourceKey<Level> p_196976_, Path p_196977_)
    • hasFixedTime

      public boolean hasFixedTime()
    • timeOfDay

      public float timeOfDay(long p_63905_)
    • moonPhase

      public int moonPhase(long p_63937_)
    • piglinSafe

      public boolean piglinSafe()
    • hasRaids

      public boolean hasRaids()
    • monsterSpawnLightTest

      public IntProvider monsterSpawnLightTest()
    • monsterSpawnBlockLightLimit

      public int monsterSpawnBlockLightLimit()
    • 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.
    • fixedTime

      public OptionalLong fixedTime()
      Returns the value of the fixedTime record component.
      Returns:
      the value of the fixedTime record component
    • hasSkyLight

      public boolean hasSkyLight()
      Returns the value of the hasSkyLight record component.
      Returns:
      the value of the hasSkyLight record component
    • hasCeiling

      public boolean hasCeiling()
      Returns the value of the hasCeiling record component.
      Returns:
      the value of the hasCeiling record component
    • ultraWarm

      public boolean ultraWarm()
      Returns the value of the ultraWarm record component.
      Returns:
      the value of the ultraWarm record component
    • natural

      public boolean natural()
      Returns the value of the natural record component.
      Returns:
      the value of the natural record component
    • coordinateScale

      public double coordinateScale()
      Returns the value of the coordinateScale record component.
      Returns:
      the value of the coordinateScale record component
    • bedWorks

      public boolean bedWorks()
      Returns the value of the bedWorks record component.
      Returns:
      the value of the bedWorks record component
    • respawnAnchorWorks

      public boolean respawnAnchorWorks()
      Returns the value of the respawnAnchorWorks record component.
      Returns:
      the value of the respawnAnchorWorks record component
    • minY

      public int minY()
      Returns the value of the minY record component.
      Returns:
      the value of the minY record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • logicalHeight

      public int logicalHeight()
      Returns the value of the logicalHeight record component.
      Returns:
      the value of the logicalHeight record component
    • infiniburn

      public TagKey<Block> infiniburn()
      Returns the value of the infiniburn record component.
      Returns:
      the value of the infiniburn record component
    • effectsLocation

      public ResourceLocation effectsLocation()
      Returns the value of the effectsLocation record component.
      Returns:
      the value of the effectsLocation record component
    • ambientLight

      public float ambientLight()
      Returns the value of the ambientLight record component.
      Returns:
      the value of the ambientLight record component
    • monsterSettings

      public DimensionType.MonsterSettings monsterSettings()
      Returns the value of the monsterSettings record component.
      Returns:
      the value of the monsterSettings record component