Package net.glowstone.util

Examples of net.glowstone.util.BlockStateDelegate


    private final BlockStateDelegate delegate;
    private boolean forceUpdate;

    public TreeGenerator() {
        this(new BlockStateDelegate());
        forceUpdate = true;
    }
View Full Code Here


        return generateTree(location, type, null);
    }

    @Override
    public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
        final BlockStateDelegate blockStateDelegate = new BlockStateDelegate();
        final TreeGenerator generator = new TreeGenerator(blockStateDelegate);
        if (generator.generate(random, loc, type)) {
            final List<BlockState> blockStates = new ArrayList<BlockState>(blockStateDelegate.getBlockStates());
            StructureGrowEvent growEvent = new StructureGrowEvent(loc, type, false, null, blockStates);
            EventFactory.callEvent(growEvent);
            if (!growEvent.isCancelled()) {
                for (BlockState state : blockStates) {
                    state.update(true);
View Full Code Here

TOP

Related Classes of net.glowstone.util.BlockStateDelegate

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.