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> p_251356_) -
Method Summary
Modifier and TypeMethodDescription(package private) static com.mojang.serialization.LifecyclecheckStability(ResourceKey<LevelStem> key, LevelStem stem) Returns the value of thedimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.get(ResourceKey<LevelStem> stemKey) final inthashCode()Returns a hash code value for this object.booleanisDebug()private static booleanisStableEnd(LevelStem levelStem) private static booleanisStableNether(LevelStem levelStem) private static booleanisStableOverworld(LevelStem levelStem) private static booleanisVanillaLike(ResourceKey<LevelStem> key, LevelStem stem) static Stream<ResourceKey<LevelStem>> keysInOrder(Stream<ResourceKey<LevelStem>> stemKeys) com.google.common.collect.ImmutableSet<ResourceKey<Level>> levels()replaceOverworldGenerator(RegistryAccess registryAccess, ChunkGenerator chunkGenerator) private static PrimaryLevelData.SpecialWorldPropertyspecialWorldProperty(Registry<LevelStem> stemRegistry) final StringtoString()Returns a string representation of this record class.static Map<ResourceKey<LevelStem>, LevelStem> withOverworld(Map<ResourceKey<LevelStem>, LevelStem> stemMap, Holder<DimensionType> dimensionType, ChunkGenerator chunkGenerator) static Map<ResourceKey<LevelStem>, LevelStem> withOverworld(Registry<DimensionType> dimensionTypeRegistry, Map<ResourceKey<LevelStem>, LevelStem> stemMap, ChunkGenerator chunkGenerator)
-
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(RegistryAccess registryAccess, ChunkGenerator chunkGenerator) -
withOverworld
public static Map<ResourceKey<LevelStem>,LevelStem> withOverworld(Registry<DimensionType> dimensionTypeRegistry, Map<ResourceKey<LevelStem>, LevelStem> stemMap, ChunkGenerator chunkGenerator) -
withOverworld
public static Map<ResourceKey<LevelStem>,LevelStem> withOverworld(Map<ResourceKey<LevelStem>, LevelStem> stemMap, Holder<DimensionType> dimensionType, ChunkGenerator chunkGenerator) -
overworld
-
get
-
levels
-
isDebug
public boolean isDebug() -
specialWorldProperty
private static PrimaryLevelData.SpecialWorldProperty specialWorldProperty(Registry<LevelStem> stemRegistry) -
checkStability
static com.mojang.serialization.Lifecycle checkStability(ResourceKey<LevelStem> key, LevelStem stem) -
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 thedimensionsrecord component.- Returns:
- the value of the
dimensionsrecord component
-