-
Bug
-
Resolution: Unresolved
-
None
-
1.14.4, 19w34a, 19w35a, 19w36a, 1.15.2, 20w08a, 20w09a, 20w10a, 20w11a, 20w12a, 20w14a, 20w16a, 20w17a, 20w18a, 20w20b, 1.16 Pre-release 5, 1.16.1, 1.16.2 Pre-release 1, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w19a, 1.17.1, 21w37a, 1.18.1, 1.19.1, 1.19.2, 22w42a, 1.19.3 Release Candidate 1, 1.19.3, 23w03a, 1.19.4, 23w18a, 1.20.1, 23w31a, 1.20.2
-
Confirmed
-
Chunk loading, Commands
The bug
- A. /clone checks whether the level has all the target chunks and fails if not.
- B. /fill and /execute if blocks check only the begin and end chunks. These commands cause all the target chunks to be loaded temporarily as a side effect.
These behaviors are inconsistent and should be unified into one of them.
How to reproduce
/forceload add 0 0
/forceload add 1023 0
/clone 0 0 0 1023 0 0 0 0 1
→ That position is not loaded (A)
/fill 0 0 0 1023 0 0 minecraft:stone destroy
→ Successfully filled 1024 blocks (B)
/execute if blocks 0 0 0 1023 0 0 0 0 0 all
→ Test passed, count: 1024 (B)
Code analysis
/clone uses LevelReader#hasChunkAt to check the chunks.
// net.minecraft.server.commands.CloneCommands#clone if (level.hasChunksAt(begin, end) && level.hasChunksAt(destinationBegin, destinationEnd)) { // ... } else { throw BlockPosArgument.ERROR_NOT_LOADED.create(); }
There are no preconditions like that in /fill or /execute if blocks.