putBlockDefinition(basicBlocks[5], blockBuilder, blockDefJson, FIVE_CONNECTIONS);
basicBlocks[6] = new TByteObjectHashMap<>();
putBlockDefinition(basicBlocks[6], blockBuilder, blockDefJson, SIX_CONNECTIONS);
BlockUri blockUri = new BlockUri(blockDefUri.getModuleName(), blockDefUri.getAssetName());
// Now make sure we have all combinations based on the basic set (above) and rotations
for (byte connections = 0; connections < 64; connections++) {
// Only the allowed connections should be created
if ((connections & connectionSides) == connections) {
Block block = constructBlockForConnections(connections, blockBuilder, blockDefUri, basicBlocks);
if (block == null) {
throw new IllegalStateException("Unable to find correct block definition for connections: " + connections);
}
block.setUri(new BlockUri(blockUri, String.valueOf(connections)));
blocksForConnections.put(connections, block);
}
}
final Block archetypeBlock = blocksForConnections.get(SideBitFlag.getSides(Side.RIGHT, Side.LEFT));