BedPart .java

net.minecraft.world.level.block.state.properties.BedPart (enum, 27 lines): members: HEAD, FOOT, getSerializedName, name, CODEC. strings: "foot", "head".

net.minecraft.world.level.block.state.propertiesenum27 linescommon540 B

Implements

API Surface (2)

String toString()
String getSerializedName()

Fields & Constants (2)

CODEC
name

String literals (2)

"head"
"foot"

Code Graph: Dependencies (1)

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

Full Source

BedPart.java27 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block.state.properties;
2
3
import com.mojang.serialization.Codec;
4
import net.minecraft.util.StringRepresentable;
5
6
public enum BedPart implements StringRepresentable {
7
	HEAD("head"),
8
	FOOT("foot");
9
10
	public static final Codec<BedPart> CODEC = StringRepresentable.fromEnum(BedPart::values);
11
	private final String name;
12
13
	BedPart(final String name) {
14
		this.name = name;
15
	}
16
17
	@Override
18
	public String toString() {
19
		return this.name;
20
	}
21
22
	@Override
23
	public String getSerializedName() {
24
		return this.name;
25
	}
26
}
27

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