LevelStem .java

net.minecraft.world.level.dimension.LevelStem (record): members: generator, NETHER, END, OVERWORLD, type, CODEC. strings: "the_nether", "the_end".

net.minecraft.world.level.dimensionrecord20 linescommon1.1 KB

API Surface (1)

record LevelStem(Holder<DimensionType> type, ChunkGenerator generator)

Fields & Constants (4)

CODEC
OVERWORLD
NETHER
END

String literals (4)

"generator"
"overworld"
"the_nether"
"the_end"

Code Graph: Dependencies (6)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

LevelStem.java20 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.dimension;
2
3
import com.mojang.serialization.Codec;
4
import com.mojang.serialization.codecs.RecordCodecBuilder;
5
import net.minecraft.core.Holder;
6
import net.minecraft.core.registries.Registries;
7
import net.minecraft.resources.Identifier;
8
import net.minecraft.resources.ResourceKey;
9
import net.minecraft.world.level.chunk.ChunkGenerator;
10
11
public record LevelStem(Holder<DimensionType> type, ChunkGenerator generator) {
12
	public static final Codec<LevelStem> CODEC = RecordCodecBuilder.create(
13
		i -> i.group(DimensionType.CODEC.fieldOf("type").forGetter(LevelStem::type), ChunkGenerator.CODEC.fieldOf("generator").forGetter(LevelStem::generator))
14
			.apply(i, i.stable(LevelStem::new))
15
	);
16
	public static final ResourceKey<LevelStem> OVERWORLD = ResourceKey.create(Registries.LEVEL_STEM, Identifier.withDefaultNamespace("overworld"));
17
	public static final ResourceKey<LevelStem> NETHER = ResourceKey.create(Registries.LEVEL_STEM, Identifier.withDefaultNamespace("the_nether"));
18
	public static final ResourceKey<LevelStem> END = ResourceKey.create(Registries.LEVEL_STEM, Identifier.withDefaultNamespace("the_end"));
19
}
20

Decompiled Minecraft 26.3 source of LevelStem (net/minecraft/world/level/dimension/LevelStem.java) with Mojang official mappings, stored verbatim on the site.