Record Class WorldDimensions
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.WorldDimensions
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Set
<ResourceKey<LevelStem>> static final com.mojang.serialization.MapCodec
<WorldDimensions> private final Map
<ResourceKey<LevelStem>, LevelStem> The field for thedimensions
record component.private static final int
-
Constructor Summary
ConstructorDescriptionWorldDimensions
(Map<ResourceKey<LevelStem>, LevelStem> dimensions) Creates an instance of aWorldDimensions
record class.WorldDimensions
(Registry<LevelStem> p_251356_) -
Method Summary
Modifier and TypeMethodDescription(package private) static com.mojang.serialization.Lifecycle
checkStability
(ResourceKey<LevelStem> p_250764_, LevelStem p_248865_) Returns the value of thedimensions
record component.final boolean
Indicates whether some other object is "equal to" this one.get
(ResourceKey<LevelStem> p_250824_) final int
hashCode()
Returns a hash code value for this object.boolean
isDebug()
private static boolean
isStableEnd
(LevelStem p_250720_) private static boolean
isStableNether
(LevelStem p_250497_) private static boolean
isStableOverworld
(LevelStem p_250762_) private static boolean
isVanillaLike
(ResourceKey<LevelStem> p_250556_, LevelStem p_250034_) static Stream
<ResourceKey<LevelStem>> keysInOrder
(Stream<ResourceKey<LevelStem>> p_251309_) com.google.common.collect.ImmutableSet
<ResourceKey<Level>> levels()
replaceOverworldGenerator
(RegistryAccess p_251390_, ChunkGenerator p_248755_) private static PrimaryLevelData.SpecialWorldProperty
specialWorldProperty
(Registry<LevelStem> p_251549_) final String
toString()
Returns a string representation of this record class.static Map
<ResourceKey<LevelStem>, LevelStem> withOverworld
(Map<ResourceKey<LevelStem>, LevelStem> p_326287_, Holder<DimensionType> p_326403_, ChunkGenerator p_251737_) static Map
<ResourceKey<LevelStem>, LevelStem> withOverworld
(Registry<DimensionType> p_248907_, Map<ResourceKey<LevelStem>, LevelStem> p_326250_, ChunkGenerator p_250220_)
-
Field Details
-
dimensions
The field for thedimensions
record component. -
CODEC
-
BUILTIN_ORDER
-
VANILLA_DIMENSION_COUNT
private static final int VANILLA_DIMENSION_COUNT
-
-
Constructor Details
-
WorldDimensions
Creates an instance of aWorldDimensions
record class.- Parameters:
dimensions
- the value for thedimensions
record component
-
WorldDimensions
-
-
Method Details
-
keysInOrder
-
replaceOverworldGenerator
public WorldDimensions replaceOverworldGenerator(RegistryAccess p_251390_, ChunkGenerator p_248755_) -
withOverworld
public static Map<ResourceKey<LevelStem>,LevelStem> withOverworld(Registry<DimensionType> p_248907_, Map<ResourceKey<LevelStem>, LevelStem> p_326250_, ChunkGenerator p_250220_) -
withOverworld
public static Map<ResourceKey<LevelStem>,LevelStem> withOverworld(Map<ResourceKey<LevelStem>, LevelStem> p_326287_, Holder<DimensionType> p_326403_, ChunkGenerator p_251737_) -
overworld
-
get
-
levels
-
isDebug
public boolean isDebug() -
specialWorldProperty
private static PrimaryLevelData.SpecialWorldProperty specialWorldProperty(Registry<LevelStem> p_251549_) -
checkStability
static com.mojang.serialization.Lifecycle checkStability(ResourceKey<LevelStem> p_250764_, LevelStem p_248865_) -
isVanillaLike
-
isStableOverworld
-
isStableNether
-
isStableEnd
-
bake
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
dimensions
Returns the value of thedimensions
record component.- Returns:
- the value of the
dimensions
record component
-