Package com.sk89q.worldedit.history.change

Examples of com.sk89q.worldedit.history.change.BlockChange


     * @param block the new block
     * @deprecated Get the change set with {@link #getChangeSet()} and add the change with that
     */
    @Deprecated
    public void rememberChange(Vector position, BaseBlock existing, BaseBlock block) {
        changeSet.add(new BlockChange(position.toBlockVector(), existing, block));
    }
View Full Code Here


    }

    @Override
    public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
        BaseBlock previous = getBlock(location);
        changeSet.add(new BlockChange(location.toBlockVector(), previous, block));
        return super.setBlock(location, block);
    }
View Full Code Here

    @Override
    public void add(Change change) {
        checkNotNull(change);

        if (change instanceof BlockChange) {
            BlockChange blockChange = (BlockChange) change;
            BlockVector position = blockChange.getPosition();
            previous.put(position, blockChange.getPrevious());
            current.put(position, blockChange.getCurrent());
        } else {
            super.add(change);
        }
    }
View Full Code Here

     */
    private Function<Entry<BlockVector, BaseBlock>, Change> createTransform() {
        return new Function<Entry<BlockVector, BaseBlock>, Change>() {
            @Override
            public Change apply(Entry<BlockVector, BaseBlock> entry) {
                return new BlockChange(entry.getKey(), entry.getValue(), entry.getValue());
            }
        };
    }
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.history.change.BlockChange

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.