Package com.sk89q.worldedit.function.operation

Examples of com.sk89q.worldedit.function.operation.Operation


        return null;
    }

    @Override
    public final @Nullable Operation commit() {
        Operation ours = commitBefore();
        Operation other = extent.commit();
        if (ours != null && other != null) {
            return new OperationQueue(ours, other);
        } else if (ours != null) {
            return ours;
        } else if (other != null) {
View Full Code Here


        }
    }

    @Override
    protected Operation commitBefore() {
        return new Operation() {
            @Override
            public Operation resume(RunContext run) throws WorldEditException {
                if (!dirtyChunks.isEmpty()) {
                    world.fixAfterFastMode(dirtyChunks);
                }
View Full Code Here

        ClipboardHolder holder = session.getClipboard();
        Clipboard clipboard = holder.getClipboard();
        Region region = clipboard.getRegion();

        Vector to = atOrigin ? clipboard.getOrigin() : session.getPlacementPosition(player);
        Operation operation = holder
                .createPaste(editSession, editSession.getWorld().getWorldData())
                .to(to)
                .ignoreAirBlocks(ignoreAirBlocks)
                .build();
        Operations.completeLegacy(operation);
View Full Code Here

    public void build(EditSession editSession, Vector position, Pattern pattern, double size) throws MaxChangedBlocksException {
        Clipboard clipboard = holder.getClipboard();
        Region region = clipboard.getRegion();
        Vector centerOffset = region.getCenter().subtract(clipboard.getOrigin());

        Operation operation = holder
                .createPaste(editSession, editSession.getWorld().getWorldData())
                .to(usingOrigin ? position : position.subtract(centerOffset))
                .ignoreAirBlocks(ignoreAirBlocks)
                .build();
View Full Code Here

TOP

Related Classes of com.sk89q.worldedit.function.operation.Operation

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.