Package org.terasology.world.block

Examples of org.terasology.world.block.BlockUri


            }

            return builder.toString();
        }

        BlockUri blockUri = new BlockUri(resolvedBlockUris.get(0).toString() + BlockUri.MODULE_SEPARATOR + resolvedShapeUris.get(0).toSimpleString());
        if (blockUri.isValid()) {
            return giveBlock(blockManager.getBlockFamily(blockUri), quantity, client);
        }

        throw new IllegalArgumentException("Invalid block or shape");
    }
View Full Code Here


            final Block block = blockBySide.getValue();
            if (block == null) {
                throw new IllegalArgumentException("Missing block for side: " + side.toString());
            }
            block.setBlockFamily(this);
            block.setUri(new BlockUri(uri, side.name()));
        }

        this.archetypeBlock = archetypeBlock;
        this.sideBlocks = sideBlocks;
    }
View Full Code Here

    @Override
    public BlockFamily createBlockFamily(BlockBuilderHelper blockBuilder, AssetUri blockDefUri, BlockDefinition blockDefinition, JsonObject blockDefJson) {
        Map<Side, Block> blockMap = Maps.newHashMap();
        blockMap.putAll(blockBuilder.constructHorizontalRotatedBlocks(blockDefUri, blockDefinition));
        return new HorizontalBlockFamily(new BlockUri(blockDefUri.getModuleName(), blockDefUri.getAssetName()), getArchetypeSide(), blockMap, blockDefinition.categories);
    }
View Full Code Here

            if (block == null) {
                throw new IllegalArgumentException("Missing block for side: " + side.toString());
            }
            this.blocks.put(side, block);
            block.setBlockFamily(this);
            block.setUri(new BlockUri(uri, side.name()));
        }
    }
View Full Code Here

TOP

Related Classes of org.terasology.world.block.BlockUri

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.