MapFrame .java

net.minecraft.world.level.saveddata.maps.MapFrame (record): members: rotation, entityId, frameId, getId, pos, CODEC. strings: "entity_id", "frame-".

net.minecraft.world.level.saveddata.mapsrecord25 linescommon753 B

API Surface (3)

record MapFrame(BlockPos pos, int rotation, int entityId)
String getId()
String frameId(final BlockPos pos)

Fields & Constants (1)

CODEC

String literals (3)

"rotation"
"entity_id"
"frame-"

Code Graph: Dependencies (1)

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

Full Source

MapFrame.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.saveddata.maps;
2
3
import com.mojang.serialization.Codec;
4
import com.mojang.serialization.codecs.RecordCodecBuilder;
5
import net.minecraft.core.BlockPos;
6
7
public record MapFrame(BlockPos pos, int rotation, int entityId) {
8
	public static final Codec<MapFrame> CODEC = RecordCodecBuilder.create(
9
		i -> i.group(
10
				BlockPos.CODEC.fieldOf("pos").forGetter(MapFrame::pos),
11
				Codec.INT.fieldOf("rotation").forGetter(MapFrame::rotation),
12
				Codec.INT.fieldOf("entity_id").forGetter(MapFrame::entityId)
13
			)
14
			.apply(i, MapFrame::new)
15
	);
16
17
	public String getId() {
18
		return frameId(this.pos);
19
	}
20
21
	public static String frameId(final BlockPos pos) {
22
		return "frame-" + pos.getX() + "," + pos.getY() + "," + pos.getZ();
23
	}
24
}
25

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