PlainSignBlock .java

net.minecraft.world.level.block.PlainSignBlock (interface, 31 lines): members: getAttachmentPoint, Attachment, attachmentPoint. strings: "ground", "wall".

net.minecraft.world.level.blockinterface31 linescommon909 B

API Surface (1)

String getSerializedName()

String literals (2)

"wall"
"ground"

Code Graph: Dependencies (3)

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

Full Source

PlainSignBlock.java31 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block;
2
3
import com.mojang.serialization.Codec;
4
import net.minecraft.util.StringRepresentable;
5
import net.minecraft.world.level.block.state.BlockState;
6
7
public interface PlainSignBlock {
8
	PlainSignBlock.Attachment attachmentPoint(BlockState state);
9
10
	static PlainSignBlock.Attachment getAttachmentPoint(final BlockState blockState) {
11
		return blockState.getBlock() instanceof PlainSignBlock plainSignBlock ? plainSignBlock.attachmentPoint(blockState) : PlainSignBlock.Attachment.GROUND;
12
	}
13
14
	enum Attachment implements StringRepresentable {
15
		WALL("wall"),
16
		GROUND("ground");
17
18
		public static final Codec<PlainSignBlock.Attachment> CODEC = StringRepresentable.fromEnum(PlainSignBlock.Attachment::values);
19
		private final String name;
20
21
		Attachment(final String name) {
22
			this.name = name;
23
		}
24
25
		@Override
26
		public String getSerializedName() {
27
			return this.name;
28
		}
29
	}
30
}
31

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