Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
Zorua162 opened this issue Apr 7, 2024 · 2 comments · Fixed by #2723
Closed
2 tasks done
Labels
Approved Added if an issue has been approved by a maintainer Enhancement New feature or request

Comments

@Zorua162
Copy link

Zorua162 commented Apr 7, 2024

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.

@Zorua162 Zorua162 added the Requires Testing This is a new issue which needs to be approved before labeled with "bug" label Apr 7, 2024
@OneLiteFeather
Copy link
Member

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.

@Zorua162
Copy link
Author

Zorua162 commented Apr 9, 2024

That sounds good to me

dordsor21 added a commit that referenced this issue May 12, 2024
 - also add unstuck to a couple of other commands
 - closes #2675
@OneLiteFeather OneLiteFeather added Enhancement New feature or request Approved Added if an issue has been approved by a maintainer and removed Requires Testing This is a new issue which needs to be approved before labeled with "bug" labels May 13, 2024
NotMyFault pushed a commit that referenced this issue May 14, 2024
- also add unstuck to a couple of other commands
 - closes #2675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Added if an issue has been approved by a maintainer Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants