FastAsyncWorldEdit

FastAsyncWorldEdit

152k Downloads

Some generation commands move the player to a free position when they are in a block

Zorua162 opened this issue ยท 2 comments

commented

Server Implementation

Paper

Server Version

1.20.4

Describe the bug

When you are inside a block (i.e in spectator mode) and run the //sphere command (for example //sphere stone 1 or //sphere air 3 then it will re-position you to an air space (free location).

To Reproduce

  1. Change gamemode to spectator
  2. Fly into the ground
  3. Run the //sphere command

Expected behaviour

It shouldn't change your location (or if this is really required, then make it configurable please?)

Screenshots / Videos

No response

Error log (if applicable)

No response

Fawe Debugpaste

https://athion.net/ISPaster/paste/view/b89b475d92144ea3a96c2b2b72a07bf1

Fawe Version

2.9.3-SNAPSHOT-722;d16cb8e

Checklist

Anything else?

Also present in version 2.9.0;974078c

It looks like this is also the case for some generation commands, but not others (based on the code). For example commands that have it:

  • sphere
  • pyramid
  • generate
  • blobBrush

Generate command whic don't do this:

  • cyl
  • cone
  • hsphere
    (and rest of brushes in Generation commands)

I believe the code which causes this in FastAsyncWorldEdit/worldedit-core/src/main/java/com/sk89q/worldedit/command/GenerationCommands.java where there are the lines:

(line 296 for sphere)

        if (actor instanceof Player) {
            ((Player) actor).findFreePosition();
        }

I'd be happy to implement this if its just a case of removing those if statements, and would also be happy to look at making it configurable, but I would ideally want to be pointed to developer docs if making this configurable would be required.

commented

Well I guess we should implement a gamemode check on these lines as most of the time when player build we default think they are in creative or survival / adventure so they would get stuck and maybe even get damage. The hollow commands don't need that as there is no danger.
Should be easy to fix.

commented

That sounds good to me