mojira.dev
MC-32485

setblock fails to target blocks in unloaded chunks

The setblock command fails when targeting a block which is located in an unloaded chunk with the error message "Cannot place block outside of the world". This occurs when running in a command block, or when running the command manually.

What I expected to happen was...:
setblock command targeting a block that exists in an unloaded chunk is correctly updated.

What actually happened was...:
Error message "Cannot place block outside of the world" is shown and the block is not updated.

Steps to Reproduce:
1. Teleport to a test chunk to force the chunk to be created, if it hasn't already been.
Ex: /tp @p 1000 100 1000

2. Teleport to another spot, far enough away that the test spot is no longer loaded.
Ex: /tp @p 100 100 100

3. Run the setblock command, targeting a block in the test chunk.
Ex: /setblock 1000 100 1000 minecraft:cobblestone 0 replace

If this is (unfortunately) an intended feature perhaps the error message can be changed to better describe the problem. In my opinion a block in an unloaded chunk is not outside of the world. I would think a block outside of the world would be one that is at a negative y value or a y value greater than the max.

Linked issues

Comments 9

This is indeed intended, though you may be on to something with the message. This report will be closed as invalid, but I recommend you make a new report explaining the problem with the current message.

One other thing worth mentioning, the setblock example you gave does include a y value that is outside the maximum y value for a block. See if you encounter the same error with a y value between 0 and 255. Ex: /setblock 1000 100 1000 minecraft:cobblestone 0 replace

Whoops that was a mistype, I've fixed the example.

MC-32522 opened to request a better error message.

I was hoping to use /setblock to force chunk generation

For feature suggestions or changes please do this on Minecraft Suggestions on Reddit.

This should be "Works as Intended" or "Won't Fix", not "Invalid". Also, could it be made clear that this applies to all commands (except spreadplayers), not just setblock and fill?

I believe this was resolved as invalid because the bug is based on a feature request.

This is a legitimate bug, it's Won't Fix.

c0rdawg

(Unassigned)

Unconfirmed

setblock

Minecraft 13w38c, Minecraft 1.12

Retrieved