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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for theambientLightrecord component.private final booleanThe field for thebedWorksrecord component.static final intstatic final com.mojang.serialization.Codec<Holder<DimensionType>>private final doubleThe field for thecoordinateScalerecord component.static final com.mojang.serialization.Codec<DimensionType>private final ResourceLocationThe field for theeffectsLocationrecord component.private final OptionalLongThe field for thefixedTimerecord component.private final booleanThe field for thehasCeilingrecord component.private final booleanThe field for thehasSkyLightrecord component.private final intThe field for theheightrecord component.The field for theinfiniburnrecord component.private final intThe field for thelogicalHeightrecord component.static final intstatic final intstatic final intprivate final intThe field for theminYrecord component.private final DimensionType.MonsterSettingsThe field for themonsterSettingsrecord component.static final float[]private static final intprivate final booleanThe field for thenaturalrecord component.private final booleanThe field for therespawnAnchorWorksrecord component.private final booleanThe field for theultraWarmrecord component.static final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionDimensionType(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 aDimensionTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theambientLightrecord component.booleanbedWorks()Returns the value of thebedWorksrecord component.doubleReturns the value of thecoordinateScalerecord component.Returns the value of theeffectsLocationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefixedTimerecord component.static PathgetStorageFolder(ResourceKey<Level> p_196976_, Path p_196977_) static doublegetTeleportationScale(DimensionType p_63909_, DimensionType p_63910_) booleanReturns the value of thehasCeilingrecord component.booleanfinal inthashCode()Returns a hash code value for this object.booleanhasRaids()booleanReturns the value of thehasSkyLightrecord component.intheight()Returns the value of theheightrecord component.Returns the value of theinfiniburnrecord component.intReturns the value of thelogicalHeightrecord component.intminY()Returns the value of theminYrecord component.Returns the value of themonsterSettingsrecord component.intintmoonPhase(long p_63937_) booleannatural()Returns the value of thenaturalrecord component.static com.mojang.serialization.DataResult<ResourceKey<Level>>parseLegacy(com.mojang.serialization.Dynamic<?> p_63912_) Deprecated.booleanbooleanReturns the value of therespawnAnchorWorksrecord component.floattimeOfDay(long p_63905_) final StringtoString()Returns a string representation of this record class.booleanReturns the value of theultraWarmrecord component.
-
Field Details
-
fixedTime
The field for thefixedTimerecord component. -
hasSkyLight
private final boolean hasSkyLightThe field for thehasSkyLightrecord component. -
hasCeiling
private final boolean hasCeilingThe field for thehasCeilingrecord component. -
ultraWarm
private final boolean ultraWarmThe field for theultraWarmrecord component. -
natural
private final boolean naturalThe field for thenaturalrecord component. -
coordinateScale
private final double coordinateScaleThe field for thecoordinateScalerecord component. -
bedWorks
private final boolean bedWorksThe field for thebedWorksrecord component. -
respawnAnchorWorks
private final boolean respawnAnchorWorksThe field for therespawnAnchorWorksrecord component. -
minY
private final int minYThe field for theminYrecord component. -
height
private final int heightThe field for theheightrecord component. -
logicalHeight
private final int logicalHeightThe field for thelogicalHeightrecord component. -
infiniburn
The field for theinfiniburnrecord component. -
effectsLocation
The field for theeffectsLocationrecord component. -
ambientLight
private final float ambientLightThe field for theambientLightrecord component. -
monsterSettings
The field for themonsterSettingsrecord 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 aDimensionTyperecord class.- Parameters:
fixedTime- the value for thefixedTimerecord componenthasSkyLight- the value for thehasSkyLightrecord componenthasCeiling- the value for thehasCeilingrecord componentultraWarm- the value for theultraWarmrecord componentnatural- the value for thenaturalrecord componentcoordinateScale- the value for thecoordinateScalerecord componentbedWorks- the value for thebedWorksrecord componentrespawnAnchorWorks- the value for therespawnAnchorWorksrecord componentminY- the value for theminYrecord componentheight- the value for theheightrecord componentlogicalHeight- the value for thelogicalHeightrecord componentinfiniburn- the value for theinfiniburnrecord componenteffectsLocation- the value for theeffectsLocationrecord componentambientLight- the value for theambientLightrecord componentmonsterSettings- the value for themonsterSettingsrecord 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 thefixedTimerecord component.- Returns:
- the value of the
fixedTimerecord component
-
hasSkyLight
public boolean hasSkyLight()Returns the value of thehasSkyLightrecord component.- Returns:
- the value of the
hasSkyLightrecord component
-
hasCeiling
public boolean hasCeiling()Returns the value of thehasCeilingrecord component.- Returns:
- the value of the
hasCeilingrecord component
-
ultraWarm
public boolean ultraWarm()Returns the value of theultraWarmrecord component.- Returns:
- the value of the
ultraWarmrecord component
-
natural
public boolean natural()Returns the value of thenaturalrecord component.- Returns:
- the value of the
naturalrecord component
-
coordinateScale
public double coordinateScale()Returns the value of thecoordinateScalerecord component.- Returns:
- the value of the
coordinateScalerecord component
-
bedWorks
public boolean bedWorks()Returns the value of thebedWorksrecord component.- Returns:
- the value of the
bedWorksrecord component
-
respawnAnchorWorks
public boolean respawnAnchorWorks()Returns the value of therespawnAnchorWorksrecord component.- Returns:
- the value of the
respawnAnchorWorksrecord component
-
minY
public int minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
logicalHeight
public int logicalHeight()Returns the value of thelogicalHeightrecord component.- Returns:
- the value of the
logicalHeightrecord component
-
infiniburn
Returns the value of theinfiniburnrecord component.- Returns:
- the value of the
infiniburnrecord component
-
effectsLocation
Returns the value of theeffectsLocationrecord component.- Returns:
- the value of the
effectsLocationrecord component
-
ambientLight
public float ambientLight()Returns the value of theambientLightrecord component.- Returns:
- the value of the
ambientLightrecord component
-
monsterSettings
Returns the value of themonsterSettingsrecord component.- Returns:
- the value of the
monsterSettingsrecord component
-