Record Class WorldDimensions
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.WorldDimensions
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Set<ResourceKey<LevelStem>> static final com.mojang.serialization.MapCodec<WorldDimensions> private final Map<ResourceKey<LevelStem>, LevelStem> The field for thedimensionsrecord component.private static final int -
Constructor Summary
ConstructorsConstructorDescriptionWorldDimensions(Map<ResourceKey<LevelStem>, LevelStem> dimensions) Creates an instance of aWorldDimensionsrecord class.WorldDimensions(Registry<LevelStem> registry) -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.mojang.serialization.LifecyclecheckStability(ResourceKey<LevelStem> key, LevelStem dimension) Returns the value of thedimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.get(ResourceKey<LevelStem> key) final inthashCode()Returns a hash code value for this object.booleanisDebug()private static booleanisStableEnd(LevelStem dimension) private static booleanisStableNether(LevelStem dimension) private static booleanisStableOverworld(LevelStem dimension) private static booleanisVanillaLike(ResourceKey<LevelStem> key, LevelStem dimension) static Stream<ResourceKey<LevelStem>> keysInOrder(Stream<ResourceKey<LevelStem>> knownKeys) levels()replaceOverworldGenerator(HolderLookup.Provider registries, ChunkGenerator generator) private static PrimaryLevelData.SpecialWorldPropertyspecialWorldProperty(Registry<LevelStem> registry) final StringtoString()Returns a string representation of this record class.static Map<ResourceKey<LevelStem>, LevelStem> withOverworld(Map<ResourceKey<LevelStem>, LevelStem> dimensions, Holder<DimensionType> type, ChunkGenerator generator) static Map<ResourceKey<LevelStem>, LevelStem> withOverworld(HolderLookup<DimensionType> dimensionTypes, Map<ResourceKey<LevelStem>, LevelStem> dimensions, ChunkGenerator generator)
-
Field Details
-
dimensions
The field for thedimensionsrecord component. -
CODEC
-
BUILTIN_ORDER
-
VANILLA_DIMENSION_COUNT
private static final int VANILLA_DIMENSION_COUNT
-
-
Constructor Details
-
WorldDimensions
Creates an instance of aWorldDimensionsrecord class.- Parameters:
dimensions- the value for thedimensionsrecord component
-
WorldDimensions
-
-
Method Details
-
keysInOrder
-
replaceOverworldGenerator
public WorldDimensions replaceOverworldGenerator(HolderLookup.Provider registries, ChunkGenerator generator) -
withOverworld
public static Map<ResourceKey<LevelStem>, LevelStem> withOverworld(HolderLookup<DimensionType> dimensionTypes, Map<ResourceKey<LevelStem>, LevelStem> dimensions, ChunkGenerator generator) -
withOverworld
public static Map<ResourceKey<LevelStem>, LevelStem> withOverworld(Map<ResourceKey<LevelStem>, LevelStem> dimensions, Holder<DimensionType> type, ChunkGenerator generator) -
overworld
-
get
-
levels
-
isDebug
public boolean isDebug() -
specialWorldProperty
private static PrimaryLevelData.SpecialWorldProperty specialWorldProperty(Registry<LevelStem> registry) -
checkStability
private static com.mojang.serialization.Lifecycle checkStability(ResourceKey<LevelStem> key, LevelStem dimension) -
isVanillaLike
-
isStableOverworld
-
isStableNether
-
isStableEnd
-
bake
-
toString
-
hashCode
-
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 thedimensionsrecord component.- Returns:
- the value of the
dimensionsrecord component
-