DebugEntityBlockIntersection .java

net.minecraft.util.debug.DebugEntityBlockIntersection (enum): members: IN_BLOCK, IN_FLUID, IN_AIR, BY_ID, color, STREAM_CODEC. imports: ByIdMap, ByteBuf.

net.minecraft.util.debugenum28 linescommon839 B

API Surface (1)

int color()

Fields & Constants (4)

BY_ID
STREAM_CODEC
id
color

Code Graph: Dependencies (3)

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

Full Source

DebugEntityBlockIntersection.java28 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util.debug;
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 DebugEntityBlockIntersection {
10
	IN_BLOCK(0, 1610678016),
11
	IN_FLUID(1, 1610612991),
12
	IN_AIR(2, 1613968179);
13
14
	private static final IntFunction<DebugEntityBlockIntersection> BY_ID = ByIdMap.continuous(i -> i.id, values(), ByIdMap.OutOfBoundsStrategy.ZERO);
15
	public static final StreamCodec<ByteBuf, DebugEntityBlockIntersection> STREAM_CODEC = ByteBufCodecs.idMapper(BY_ID, i -> i.id);
16
	private final int id;
17
	private final int color;
18
19
	DebugEntityBlockIntersection(final int id, final int color) {
20
		this.id = id;
21
		this.color = color;
22
	}
23
24
	public int color() {
25
		return this.color;
26
	}
27
}
28

Decompiled Minecraft 26.3 source of DebugEntityBlockIntersection (net/minecraft/util/debug/DebugEntityBlockIntersection.java) with Mojang official mappings, stored verbatim on the site.