Paste #17475: SK89's copy/paste builder alg

Date: 2015/07/06 22:15:41 UTC-07:00
Type: Plain Text

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10


public Operation build() {
        BlockTransformExtent extent = new BlockTransformExtent(clipboard, transform, targetWorldData.getBlockRegistry());
        ForwardExtentCopy copy = new ForwardExtentCopy(extent, clipboard.getRegion(), clipboard.getOrigin(), targetExtent, to);
        copy.setTransform(transform);
        if (ignoreAirBlocks) {
            copy.setSourceMask(new ExistingBlockMask(clipboard));
        }
        return copy;
    }