SignTextSlot .java

net.minecraft.world.level.block.entity.SignTextSlot (enum, 21 lines): members: BACK, FRONT, BY_ID, STREAM_CODEC. imports: ByIdMap, ByteBuf, ByteBufCodecs.

net.minecraft.world.level.block.entityenum21 linescommon622 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (3)

BY_ID
STREAM_CODEC
id

Code Graph: Dependencies (3)

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

Full Source

SignTextSlot.java21 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.block.entity;
2
3
import io.netty.buffer.ByteBuf;
4
import java.util.function.IntFunction;
5
import net.minecraft.network.codec.ByteBufCodecs;
6
import net.minecraft.network.codec.StreamCodec;
7
import net.minecraft.util.ByIdMap;
8
9
public enum SignTextSlot {
10
	BACK(0),
11
	FRONT(1);
12
13
	private final int id;
14
	private static final IntFunction<SignTextSlot> BY_ID = ByIdMap.continuous(h -> h.id, values(), ByIdMap.OutOfBoundsStrategy.ZERO);
15
	public static final StreamCodec<ByteBuf, SignTextSlot> STREAM_CODEC = ByteBufCodecs.idMapper(BY_ID, h -> h.id);
16
17
	SignTextSlot(final int id) {
18
		this.id = id;
19
	}
20
}
21

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