FastAsyncVoxelSniper

FastAsyncVoxelSniper

33.4k Downloads

Clone Stamp does not paste correctly

JollyajaX opened this issue ยท 0 comments

commented

Server Implementation

Paper

Server Version

1.16.5

Describe the bug

Hey all,

I believe there was a merge and/or code refactor issue that has resulted in the Clone Stamp tool to no longer place correctly. I believe the issue lies in the following code:

https://github.com/IntellectualSites/FastAsyncVoxelSniper/blob/main/src/main/java/com/thevoxelbox/voxelsniper/brush/type/stamp/AbstractStampBrush.java#L80-L88

The value of clampY is not used, nor is it required in this method. Additionally, the call to setBlockData sets the data at the target position for every block in the clone. This should have the delta position applied.

A working version of this method looks like the following:

    protected void setBlock(StampBrushBlockWrapper blockWrapper) {
        BlockVector3 targetBlock = getTargetBlock();

        setBlockData(
                targetBlock.getX() + blockWrapper.getX(),
                targetBlock.getY() + blockWrapper.getY(),
                targetBlock.getZ() + blockWrapper.getZ(),
                blockWrapper.getBlockData()
        );
    }

To Reproduce

  1. Enable a clone stamp brush /b cs a (for the no-air mode)
  2. Set a brush size and height /b 5 /vh 5
  3. Use the gunpowder to create a stamp
  4. Use the arrow to paste said stamp, observe only 1 block being placed

Expected behaviour

All blocks within a selection should be pasted.

Screenshots / Videos

No response

Error log (if applicable)

No response

Favs Debugpaste

N/A

Favs Version

FastAsyncVoxelSniper 2.2.4

Checklist

Anything else?

No response