private static final String BOTTOM = "bottom";
@Override
public BlockFamily createBlockFamily(BlockBuilderHelper blockBuilder, AssetUri blockDefUri, BlockDefinition blockDefinition, JsonObject blockDefJson) {
Map<Side, Block> blockMap = Maps.newEnumMap(Side.class);
BlockDefinition topDef = blockBuilder.getBlockDefinitionForSection(blockDefJson, TOP);
if (topDef != null) {
Block block = blockBuilder.constructSimpleBlock(blockDefUri, topDef);
block.setDirection(Side.TOP);
blockMap.put(Side.TOP, block);
}
BlockDefinition sideDef = blockBuilder.getBlockDefinitionForSection(blockDefJson, SIDES);
if (sideDef != null) {
blockMap.putAll(blockBuilder.constructHorizontalRotatedBlocks(blockDefUri, sideDef));
}
BlockDefinition bottomDef = blockBuilder.getBlockDefinitionForSection(blockDefJson, BOTTOM);
if (bottomDef != null) {
Block block = blockBuilder.constructSimpleBlock(blockDefUri, bottomDef);
block.setDirection(Side.BOTTOM);
blockMap.put(Side.BOTTOM, block);
}