420421422423424425426427428429430
byte[] modes = new byte[6]; int i = 0; for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { ConnectionMode mode = forcedConnections.get(dir); if(mode != null) { modes[i] = (byte) mode.ordinal(); } else { modes[i] = -1; } i++; }