The `/brush command` is broken.
elteammate opened this issue ยท 1 comments
Server Implementation
Paper
Server Version
1.20
Describe the bug
According to the documentation, the expected usage of /brush command
subcommand looks like this:
/br command 2 "set 1"
However, when run in game, it does nothing but selecting the region. No errors in console, no /set 1
. "/set 1"
and "//set 1"
commands also do not work. According to @NotMyFault at #1952:
According to the code, the supported syntax would be something like
/br command 5 "br sphere 5 5"
I'm not sure about how is this the supposed syntax because it does not make much sense. The specialized brush command which just sets the brush is completely useless. Moreover, the code I looked at looks completely normal and I would expect it to act as a normal, proper brush. As further noted in that issue (incorrectly noted, but still acknowledged), combining commands through ;
also does not work:
/br command 0 "br sphere stone 1; br sphere glass 2"
only applies the first brush.
Finally, the placeholders are apparently being interpolated only during the brush creation.
/br command 0 "br sphere {x} 1"
Will put a blob of blocks based on where the command was executed, and not where the brush is pointing at.
This leads me to believe that the brush command
executes its logic only during initialization, but it's still a mystery as to why (the source code looks pretty normal to me) and why it only works "sometimes" (why /br cmd 0 "set 1"
does not run /set 1
at startup, but /br cmd 0 "br s 1 1"
does?).
To Reproduce
Assuming on a paper server with a single plugin (FAWE) installed:
- Take any tool, like a stone pickaxe
- Run
/br command 2 "set 1"
- Use the brush and observe how it does not run
/set 1
See other complaints above.
Expected behaviour
The /br command <r> <commands>
subcommand binds a tool to do the following every use:
- Set the player selection to a cube of radius
r
, with a center at the target block - Replaces the placeholders in
<commands>
argument with the coordinates of the target block, the world name and the size of the selection - Runs the commands specified in
<commands>
one by one, using;
as a separator
One might expect the selection to be reset to the one before the tool use, but I will argue against it for the sake of simplifying the implementation.
Screenshots / Videos
No response
Error log (if applicable)
No response
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/d87e3b252ec2423db2cceac3d2088ba2
Fawe Version
2.6.4-SNAPSHOT-494;05d5ad1
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
I did some testing on this, and the first command listed is being skipped.
I started with the following command:
//br cmd 0 "/outset 5;/set 1;/outset 5;/gmask ![1];/set 95;/gmask"
The expected result was an 11x11x11
stone block and a 21x21x21
stained_glass block. However, the actual result was a 1x1x1
block of stone with an 11x11x11
stained_glass block surrounding it.
To resolve this issue, I modified the command as follows:
//br cmd 0 "/gmask;/outset 10;/set 1;/outset 10;/gmask ![1];/set 95;/gmask"
In this modified version, the command worked as expected.
The first /gmask
command was skipped, which was verified by setting a //gmask ![air]
first.
This previous //gmask
command remained active when reaching the /set 1
part.