API Surface (0) No public/protected methods detected (fields or constants only).
Code Graph: Dependencies (4) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
ExperimentalRedstoneUtils.java 30 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.world.level.redstone;
2
3 import net.minecraft.core.Direction;
4 import net.minecraft.world.flag.FeatureFlags;
5 import net.minecraft.world.level.Level;
6 import org.jspecify.annotations.Nullable;
7
8 public class ExperimentalRedstoneUtils {
9 public static @Nullable Orientation initialOrientation(final Level level, final @Nullable Direction front, final @Nullable Direction up) {
10 if (level.enabledFeatures().contains(FeatureFlags.REDSTONE_EXPERIMENTS)) {
11 Orientation orientation = Orientation.random(level.getRandom()).withSideBias(Orientation.SideBias.LEFT);
12 if (up != null) {
13 orientation = orientation.withUp(up);
14 }
15
16 if (front != null) {
17 orientation = orientation.withFront(front);
18 }
19
20 return orientation;
21 } else {
22 return null;
23 }
24 }
25
26 public static @Nullable Orientation withFront(final @Nullable Orientation orientation, final Direction front) {
27 return orientation == null ? null : orientation.withFront(front);
28 }
29 }
30
Decompiled Minecraft 26.3 source of ExperimentalRedstoneUtils (net/minecraft/world/level/redstone/ExperimentalRedstoneUtils.java) with Mojang official mappings, stored verbatim on the site.