Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-184457

/fill command temporarily loads chunks adjacent to placed blocks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2, 20w20b
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      When the /fill command is run, it seems to run a sort of update on every block adjacent to the ones being placed. When this happens on the boundary between a loaded and unloaded chunk, the unloaded chunk becomes temporarily loaded.

      To reproduce run, go to 0,0 in your world with no forceloaded chunks, create the dummy objective "value," and have your render distance set to 16 so that the loaded chunk range extends out a clean 256 blocks, then run a function with the following contents:

      execute store result score #first_check value unless block 272 255 0 void_air
      
      execute if score #first_check value matches 0 run tellraw @a {"text":"Block is in unloaded chunk","color":"red"}
      execute if score #first_check value matches 1 run tellraw @a {"text":"Block is in loaded chunk"}
      
      execute positioned 256 255 0 run fill ~00 255 ~00 ~15 255 ~15 glass
      execute positioned 256 255 0 run fill ~00 255 ~00 ~15 255 ~15 air
      
      execute store result score #second_check value unless block 272 255 0 void_air
      
      execute if score #second_check value matches 0 run tellraw @a {"text":"Block is in unloaded chunk","color":"red"}
      execute if score #second_check value matches 1 run tellraw @a {"text":"Block is in loaded chunk"}
      

       
      This will cause the first check to fail, but the second check (after the /fill command) to succeed.
       
      Notice how if you set your render distance to 15, both checks succeed, and at render distance 17, both checks fail.
       
      After some more testing, I have discovered that the chunk appears to stay loaded for 5 ticks. This would be consistent with information from the wiki about this matter. It would also seem that performing block checks inside of the newly loaded chunk every tick keeps it loaded, and only by measuring it every other tick could I properly measure the time it stayed loaded.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Part Toon Part Toon
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: