Package org.terasology.world.block.family

Examples of org.terasology.world.block.family.HorizontalBlockFamily


        blockInFamilyOne.setKeepActive(true);
        blockInFamilyOne.setPrefab("test:prefabWithString");
        blockInFamilyTwo = new Block();
        blockInFamilyTwo.setPrefab("test:prefabWithString");
        blockInFamilyTwo.setKeepActive(true);
        blockManager.addBlockFamily(new HorizontalBlockFamily(new BlockUri("test:blockFamily"),
                ImmutableMap.<Side, Block>of(Side.FRONT, blockInFamilyOne, Side.LEFT, blockInFamilyTwo, Side.RIGHT, blockInFamilyTwo, Side.BACK, blockInFamilyOne),
                Collections.<String>emptyList()), true);

        keepActiveBlock = new Block();
        keepActiveBlock.setKeepActive(true);
View Full Code Here


                        block.setDisplayName(shape.getDisplayName());
                    } else if (!shape.getDisplayName().isEmpty()) {
                        block.setDisplayName(block.getDisplayName() + " " + shape.getDisplayName());
                    }
                }
                return new HorizontalBlockFamily(uri, blockMap, def.categories);
            }
        } catch (Exception e) {
            logger.error("Error loading block shape {}", uri, e);
        }
        return null;
View Full Code Here

                    Block block = constructSingleBlock(blockDefUri, blockDef);
                    result.add(new SymmetricFamily(familyUri, block, blockDef.categories));
                } else {
                    Map<Side, Block> blockMap = Maps.newEnumMap(Side.class);
                    constructHorizontalBlocks(blockDefUri, blockDef, blockMap);
                    result.add(new HorizontalBlockFamily(familyUri, blockMap, blockDef.categories));
                }
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.terasology.world.block.family.HorizontalBlockFamily

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.