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
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final float
The field for theambientLight
record component.private final boolean
The field for thebedWorks
record component.static final int
static final com.mojang.serialization.Codec<Holder<DimensionType>>
private final double
The field for thecoordinateScale
record component.static final com.mojang.serialization.Codec<DimensionType>
private final ResourceLocation
The field for theeffectsLocation
record component.private final OptionalLong
The field for thefixedTime
record component.private final boolean
The field for thehasCeiling
record component.private final boolean
The field for thehasSkyLight
record component.private final int
The field for theheight
record component.The field for theinfiniburn
record component.private final int
The field for thelogicalHeight
record component.static final int
static final int
static final int
private final int
The field for theminY
record component.private final DimensionType.MonsterSettings
The field for themonsterSettings
record component.static final float[]
private static final int
private final boolean
The field for thenatural
record component.private final boolean
The field for therespawnAnchorWorks
record component.private final boolean
The field for theultraWarm
record component.static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionDimensionType
(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 aDimensionType
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of theambientLight
record component.boolean
bedWorks()
Returns the value of thebedWorks
record component.double
Returns the value of thecoordinateScale
record component.Returns the value of theeffectsLocation
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefixedTime
record component.static Path
getStorageFolder
(ResourceKey<Level> p_196976_, Path p_196977_) static double
getTeleportationScale
(DimensionType p_63909_, DimensionType p_63910_) boolean
Returns the value of thehasCeiling
record component.boolean
final int
hashCode()
Returns a hash code value for this object.boolean
hasRaids()
boolean
Returns the value of thehasSkyLight
record component.int
height()
Returns the value of theheight
record component.Returns the value of theinfiniburn
record component.int
Returns the value of thelogicalHeight
record component.int
minY()
Returns the value of theminY
record component.Returns the value of themonsterSettings
record component.int
int
moonPhase
(long p_63937_) boolean
natural()
Returns the value of thenatural
record component.static com.mojang.serialization.DataResult<ResourceKey<Level>>
parseLegacy
(com.mojang.serialization.Dynamic<?> p_63912_) Deprecated.boolean
boolean
Returns the value of therespawnAnchorWorks
record component.float
timeOfDay
(long p_63905_) final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theultraWarm
record component.
-
Field Details
-
fixedTime
The field for thefixedTime
record component. -
hasSkyLight
private final boolean hasSkyLightThe field for thehasSkyLight
record component. -
hasCeiling
private final boolean hasCeilingThe field for thehasCeiling
record component. -
ultraWarm
private final boolean ultraWarmThe field for theultraWarm
record component. -
natural
private final boolean naturalThe field for thenatural
record component. -
coordinateScale
private final double coordinateScaleThe field for thecoordinateScale
record component. -
bedWorks
private final boolean bedWorksThe field for thebedWorks
record component. -
respawnAnchorWorks
private final boolean respawnAnchorWorksThe field for therespawnAnchorWorks
record component. -
minY
private final int minYThe field for theminY
record component. -
height
private final int heightThe field for theheight
record component. -
logicalHeight
private final int logicalHeightThe field for thelogicalHeight
record component. -
infiniburn
The field for theinfiniburn
record component. -
effectsLocation
The field for theeffectsLocation
record component. -
ambientLight
private final float ambientLightThe field for theambientLight
record component. -
monsterSettings
The field for themonsterSettings
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
-
MOON_PHASES
private static final int MOON_PHASES- See Also:
-
MOON_BRIGHTNESS_PER_PHASE
public static final float[] MOON_BRIGHTNESS_PER_PHASE -
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 aDimensionType
record class.- Parameters:
fixedTime
- the value for thefixedTime
record componenthasSkyLight
- the value for thehasSkyLight
record componenthasCeiling
- the value for thehasCeiling
record componentultraWarm
- the value for theultraWarm
record componentnatural
- the value for thenatural
record componentcoordinateScale
- the value for thecoordinateScale
record componentbedWorks
- the value for thebedWorks
record componentrespawnAnchorWorks
- the value for therespawnAnchorWorks
record componentminY
- the value for theminY
record componentheight
- the value for theheight
record componentlogicalHeight
- the value for thelogicalHeight
record componentinfiniburn
- the value for theinfiniburn
record componenteffectsLocation
- the value for theeffectsLocation
record componentambientLight
- the value for theambientLight
record componentmonsterSettings
- the value for themonsterSettings
record component
-
-
Method Details
-
parseLegacy
@Deprecated public static com.mojang.serialization.DataResult<ResourceKey<Level>> parseLegacy(com.mojang.serialization.Dynamic<?> p_63912_) Deprecated. -
getTeleportationScale
-
getStorageFolder
-
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
-
monsterSpawnBlockLightLimit
public int monsterSpawnBlockLightLimit() -
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. -
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. -
equals
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 withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
fixedTime
Returns the value of thefixedTime
record component.- Returns:
- the value of the
fixedTime
record component
-
hasSkyLight
public boolean hasSkyLight()Returns the value of thehasSkyLight
record component.- Returns:
- the value of the
hasSkyLight
record component
-
hasCeiling
public boolean hasCeiling()Returns the value of thehasCeiling
record component.- Returns:
- the value of the
hasCeiling
record component
-
ultraWarm
public boolean ultraWarm()Returns the value of theultraWarm
record component.- Returns:
- the value of the
ultraWarm
record component
-
natural
public boolean natural()Returns the value of thenatural
record component.- Returns:
- the value of the
natural
record component
-
coordinateScale
public double coordinateScale()Returns the value of thecoordinateScale
record component.- Returns:
- the value of the
coordinateScale
record component
-
bedWorks
public boolean bedWorks()Returns the value of thebedWorks
record component.- Returns:
- the value of the
bedWorks
record component
-
respawnAnchorWorks
public boolean respawnAnchorWorks()Returns the value of therespawnAnchorWorks
record component.- Returns:
- the value of the
respawnAnchorWorks
record component
-
minY
public int minY()Returns the value of theminY
record component.- Returns:
- the value of the
minY
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
logicalHeight
public int logicalHeight()Returns the value of thelogicalHeight
record component.- Returns:
- the value of the
logicalHeight
record component
-
infiniburn
Returns the value of theinfiniburn
record component.- Returns:
- the value of the
infiniburn
record component
-
effectsLocation
Returns the value of theeffectsLocation
record component.- Returns:
- the value of the
effectsLocation
record component
-
ambientLight
public float ambientLight()Returns the value of theambientLight
record component.- Returns:
- the value of the
ambientLight
record component
-
monsterSettings
Returns the value of themonsterSettings
record component.- Returns:
- the value of the
monsterSettings
record component
-