FastAsyncWorldEdit icon indicating copy to clipboard operation
FastAsyncWorldEdit copied to clipboard

running fill command causes ghost blocks in latest build

Open KrispyBigPvp opened this issue 9 months ago • 10 comments

Server Implementation

Paper

Server Version

1.20.4

Describe the bug

i use a prison core that can trigger different enchants and one of them is a fill command to replace the blocks on the layer of the player with air and sell the blocks for a value, this has always worked until recent build as where now it causes 1-2 ghost blocks to remain.

To Reproduce

run this command, it is random sometimes it gets rid of all blocks sometimes it doesnt.

fill selection 100%AIR %global.blockworld% %worldguard.region-minx%, %global.blocky%, %worldguard.region-minz% %worldguard.region-maxx%, %global.blocky%, %worldguard.region-maxz%

Expected behaviour

it should remove all blocks and set them to air, it does this but seems to leave a ghost block

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/33f1fbfab6cc4eab90cddf2082f2979b

Fawe Version

2.13.1-SNAPSHOT-1061;46dc455

Checklist

  • [x] I have included a Fawe debugpaste.
  • [x] I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.

Anything else?

No response

KrispyBigPvp avatar Mar 05 '25 13:03 KrispyBigPvp

You're not using FAWE there though, that's a normal Minecraft command?

dordsor21 avatar Mar 05 '25 13:03 dordsor21

the prison core replaces blocks using fawe and that some blocks maintain client sided. here is an example

https://www.youtube.com/watch?v=ls9JyxdSB9E&feature=youtu.be

KrispyBigPvp avatar Mar 06 '25 14:03 KrispyBigPvp

Okay, so where and how is FAWE actually being used...? You've shown us a /fill command which is not FAWE - it is a default Minecraft command

dordsor21 avatar Mar 06 '25 14:03 dordsor21

i apologize if my english isnt the best as for explaining, this is coming from the dev of the prison core, "it isn't a fill command, it's an action on a plugin which uses fawe api" i thought it was a command but i was mistaken.

KrispyBigPvp avatar Mar 06 '25 14:03 KrispyBigPvp

It would be best if the prison core plugin Dev were to provide the code used to execute FAWE actions then. We can't do anything without it.

dordsor21 avatar Mar 06 '25 15:03 dordsor21

ive sent him the issue, either he or i will respond, thanks!

KrispyBigPvp avatar Mar 06 '25 15:03 KrispyBigPvp

Not the dev, but here is the relevant WorldEdit API usage from the plugin in question:

com.sk89q.worldedit.world.World adaptedWorld = BukkitAdapter.adapt(world);
RandomPattern pattern = new RandomPattern();

for (Map.Entry<Material, Double> entry : patterns.entrySet()) {
     Material bukkitMaterial = entry.getKey();
     double weight = entry.getValue();
     BlockState blockState = BukkitAdapter.adapt(bukkitMaterial.createBlockData());
     pattern.add(blockState, weight);
}

try (EditSession session = WorldEdit.getInstance().newEditSession(adaptedWorld)) {
     BlockVector3 pos1 = BlockVector3.at(minX, minY, minZ);
     BlockVector3 pos2 = BlockVector3.at(maxX, maxY, maxZ);
     Region region = new CuboidRegion(adaptedWorld, pos1, pos2);
     session.setBlocks(region, pattern);
} catch (MaxChangedBlocksException e) {
     e.printStackTrace();
}

This is all wrapped in an asynchronous task executed by the Bukkit scheduler.

tomwmth avatar May 31 '25 20:05 tomwmth

Is this still an issue? No-one else has reported any issues like this at all

dordsor21 avatar Aug 01 '25 13:08 dordsor21

I can confirm this is an issue too, I have no relation to anyone above.

    public CuboidRegion asWorldEdit() {
        return new CuboidRegion(FaweAPI.getWorld(worldName), BlockVector3.at(x1,y1,z1), BlockVector3.at(x2,y2,z2));
    }
        try (EditSession session = WorldEdit.getInstance().newEditSession(BukkitAdapter.adapt(jhCuboid.getWorld()))) {
            Region region = jhCuboid.asWorldEdit();
            session.setBlocks(region, BlockTypes.AIR);
        }

It should probably be noted that I'm using AdvancedSlimePaper 1.21.8 and I'm on the latest FAWE version. I've also tried double-queueing to no avail.

Video: https://youtu.be/giaY-wnEeZQ If any further evidence is needed, lmk.

asdevroxy avatar Oct 29 '25 03:10 asdevroxy

Can you reproduce that repeatedly? Using plain Spigot? Does the same apply to FAWE commands?

PierreSchwang avatar Oct 29 '25 20:10 PierreSchwang