Fix 'java.lang.IllegalArgumentException: minY <= maxY required' while editing under Y level 0
TetraTheta opened this issue ยท 12 comments
WorldEdit Version
7.2.15
Platform Version
git-Paper-45 (MC: 1.20.1), Fabric 0.14.21
Confirmations
- I am using the most recent Minecraft release.
- I am using a version of WorldEdit compatible with my Minecraft version.
- I am using the latest or recommended version of my platform software.
- I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
- I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)
Bug Description
When I try to use //fillr
or //set
(after selecting area) or //chunk
, WorldEdit malfunctions like this:
- Show
java.lang.IllegalArgumentException: minY <= maxY required
and do not perform command at all (//fillr
and//set
) - Blocks under Y level 0 isn't selected with
//chunk
Expected Behavior
WorldEdit should perform commands for blocks under Y level 0, rather than displaying java.lang.IllegalArgumentException: minY <= maxY required
error.
Reproduction Steps
see this comment instead
old steps
- Install WorldEdit to Paper server and Fabric client
This is because both Bukkit and Fabric version of WorldEdit malfunctions, and I haven't tested WorldEdit on other platforms - Check Paper server
- Select area with Wooden Axe in Creative Mode under Y level 0
- (Optional) Run
//chunk -s
- Run
//set 0
- Get
java.lang.IllegalArgumentException: minY <= maxY required
- Check Fabric server (Singleplayer is also server)
- Select area with Wooden Axe in Creative Mode under Y level 0
- (Optional) Run
//chunk -s
- Run
//set 0
- Get
java.lang.IllegalArgumentException: minY <= maxY required
Anything Else?
Here is a log when I try to run //fillr deepslate 10
under Y level 0 on Fabric.
https://paste.gg/p/anonymous/700f0a8952db42b79a9db6226431dd25
I know that PR #2082 exists to fix this issue, but the reason of I create new issue for this are these:
- The PR isn't updated for years. so I assume the PR is inactive or dead.
- If I manually apply that PR to my fork and try to build it with
gradlew build
, it fails. - There is no opened issue about this problem.
If you still thinking that this issue is duplicated, feel free to close this issue. But I really hope that this issue get fixed as soon as possible because this totally prevents me to edit area under Y level 0.
Here are few 'things' I've found.
I tested with current dev build(ab75fd7) built by myself, and WorldEdit CUI (Fabric) mod.
//chunk -s
doesn't select all chunk blocks
At this point, I cannot say that this is bug or not.
I expect //chunk -s
will select all blocks of chunks which user's selection intersects, regardless of Y level. But documentation says other thing:
Set the selection to your current chunk.
This command selects 256-block-tall areas, which can be specified by the y-coordinate. E.g. -c x,1,z will select from y=256 to y=511.
[-s]: Expand your selection to encompass all chunks that are part of it
Currently, //chunk -s
works like this, and this looks weird to me.
- The selection is 'above 0' to 'above 0': Select blocks only above Y 0
- The selection is 'below 0' to 'above 0': Select all blocks of chunks
- The selection is 'below 0' to 'below 0': Select blocks only below Y 0
So, it looks like WorldEdit treats single chunk as two different chunks. One is blocks above Y 0, and the other one is blocks below Y 0.
//fillr
throws error when executed while under Y 0-2
I tested //fillr
with different situations (only two though)
- Execute the command while at 'above 0': Fills block well, including 'below 0' area
- Execute the command while at 'below 0'
This is where//fillr
behave weirdly.- Execute the command while at Y -2 (XYZ on F3): Fills block well, including 'below 0' area
- Execute the command while at Y -3 and below: Throws
java.lang.IllegalArgumentException: minY <= maxY required
//set
is now working correctly
I tested both situation where the selection is 'below 0 to below 0' and 'below 0 to above 0'. It works as expected.
Conclusion
I cannot say that //chunk -s
behaves wrongly or not. Maybe this is intentional behavior.
But //fillr
is definitely broken, while executing it on under Y -2.
The //chunk -s
behavior is intentional (it's doing exactly what's described by the doc), though maybe in need of tweaking. The idea was to prevent selecting too many blocks at once when working with taller worlds, because up to 4096 height is possible with data packs, and even more with Cubic Chunks.
I didn't thought about mods or datapacks which extends world height...
If that is intentional, I wish the description of the documentation become 'more intuitive'. For me, it is hard to think of how //chunk
would work.
See #2040. It's most likely it'll be changed alongside a major version to select the current chunk section
This issue has been automatically marked as stale because it has not been fully confirmed. It will be closed if no further activity occurs. Thank you for your contributions.
I actually can't reproduce this with //set 0
. I expect //fillr
is indeed broken, but not anything else.
I actually can't reproduce this with
//set 0
. I expect//fillr
is indeed broken, but not anything else.
Maybe something got 'fixed' by intentionally or unintentionally. I will re-test this with latest dev build then, and change the title/content of this issue.
I've been testing with //set 0
at negative coordinates for a long time, so I would be surprised if it was ever broken.
There hasn't been a single worldedit release since <0 block support got added to Minecraft that hasn't supported them in general commands, fillr would be a special case of being broken. My test world is a super flat below 0, it would've been noticed immediately.
In general, all selection can be categorized by three categories:
- (above 0) to (above 0) : This will (almost always) work.
- (below 0) to (above 0): I will test this
- (below 0) to (below 0): I will test this too
And I will test these commands:
//set
//chunk -s
and//set
//fillr
The fillr issues were fixed a while ago in 3627002, unsure why GH didn't close this