RedstoneWireOrientationsRenderer .java

net.minecraft.client.renderer.debug.RedstoneWireOrientationsRenderer (class, 25 lines): members: frustum, emitGizmos. imports: DebugSubscriptions, Gizmos.

net.minecraft.client.renderer.debugclass25 linesclient1.1 KB

Implements

API Surface (1)

void emitGizmos(final double camX, final double camY, final double camZ, final DebugValueAccess debugValues, final Frustum frustum, final float partialTicks)

Fields & Constants (1)

frustum

Code Graph: Dependencies (6)

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

Full Source

RedstoneWireOrientationsRenderer.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.debug;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.client.renderer.culling.Frustum;
6
import net.minecraft.gizmos.Gizmos;
7
import net.minecraft.util.debug.DebugSubscriptions;
8
import net.minecraft.util.debug.DebugValueAccess;
9
import net.minecraft.world.phys.Vec3;
10
11
@Environment(EnvType.CLIENT)
12
public class RedstoneWireOrientationsRenderer implements DebugRenderer.SimpleDebugRenderer {
13
	@Override
14
	public void emitGizmos(
15
		final double camX, final double camY, final double camZ, final DebugValueAccess debugValues, final Frustum frustum, final float partialTicks
16
	) {
17
		debugValues.forEachBlock(DebugSubscriptions.REDSTONE_WIRE_ORIENTATIONS, (wirePos, orientation) -> {
18
			Vec3 center = Vec3.atBottomCenterOf(wirePos).subtract(0.0, 0.1, 0.0);
19
			Gizmos.arrow(center, center.add(orientation.getFront().getUnitVec3().scale(0.5)), -16776961);
20
			Gizmos.arrow(center, center.add(orientation.getUp().getUnitVec3().scale(0.4)), -65536);
21
			Gizmos.arrow(center, center.add(orientation.getSide().getUnitVec3().scale(0.3)), -256);
22
		});
23
	}
24
}
25

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