MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / getFor

Method getFor

common/buildcraft/lib/path/MiniChunkGraph.java:43–49  ·  view source on GitHub ↗
(BlockPos pos)

Source from the content-addressed store, hash-verified

41 }
42
43 public MiniChunkNode getFor(BlockPos pos) {
44 BlockPos normalised = pos.subtract(min);
45 if (!TaskMiniChunkAnalyser.isValid(normalised)) throw new IllegalArgumentException("The position " + normalised + " was invalid! (from " + pos + ")");
46 int id = graphArray[normalised.getX()][normalised.getY()][normalised.getZ()];
47 if (id >= 0) return nodes.get(id);
48 throw new IllegalArgumentException("The position " + normalised + " had no graph! (gId = " + id + ")");
49 }
50
51 public class MiniChunkNode {
52 public final int id;

Callers

nothing calls this directly

Calls 5

isValidMethod · 0.95
getXMethod · 0.65
getYMethod · 0.65
getMethod · 0.65
getZMethod · 0.45

Tested by

no test coverage detected