MCPcopy Create free account
hub / github.com/Garten/sourcecraft / getPosition

Method getPosition

src/minecraft/SubBlockPosition.java:40–76  ·  view source on GitHub ↗
(SubBlockPosition pos)

Source from the content-addressed store, hash-verified

38 }
39
40 public static Position getPosition(SubBlockPosition pos) {
41 int x = 1;
42 int y = 1;
43 int z = 1;
44 Position position;
45 switch (pos) {
46 case BOTTOM_EAST_SOUTH:
47 position = new Position(x, y - 1, z);
48 break;
49 case BOTTOM_EAST_NORTH:
50 position = new Position(x, y - 1, z - 1);
51 break;
52 case BOTTOM_WEST_SOUTH:
53 position = new Position(x - 1, y - 1, z);
54 break;
55 case BOTTOM_WEST_NORTH:
56 position = new Position(x - 1, y - 1, z - 1);
57 break;
58 case TOP_EAST_SOUTH:
59 position = new Position(x, y, z);
60 break;
61 case TOP_EAST_NORTH:
62 position = new Position(x, y, z - 1);
63 break;
64 case TOP_WEST_SOUTH:
65 position = new Position(x - 1, y, z);
66 break;
67 case TOP_WEST_NORTH:
68 position = new Position(x - 1, y, z - 1);
69 break;
70 default:
71 position = new Position(1, 1, 1);
72 Loggger.warn("default cse of subBlocks occured");
73 break;
74 }
75 return position;
76 }
77}

Callers

nothing calls this directly

Calls 1

warnMethod · 0.95

Tested by

no test coverage detected