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

Campfires and hoppers cause constant chunk saving

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 22w05a
    • 1.18.1
    • None
    • Confirmed
    • Performance
    • Important

      While a campfire is burning items (for example it's both lit and there's 1-4 raw beef placed on it) minecraft attempts to save the chunks it's in every tick (which causes constant disk writing) - however this is noticeable as an increase to tick times. Placing multiple campfires in the same chunk doesn't increase tick times at all.

       

      Reproduction

      1. Create a new "superflat" world
      2. Ensure no mobs are present by running the commands: "/gamerule doMobSpawning false" once, and "/kill @e[type=!player]" twice
      3. Open the "Profiling debug screen" with "Alt+F3". It should show average tick times (bottom right corner) of about 1ms.
      4. Locate chunk boundries with "F3+G"
      5. Place 4 campfires down at the corner (see screenshot 01)
      6. Add 1 Raw Beef to each campfire
      7. Tick times should have increased appreciably. (Alternatively using a tool like "iotop" should show increased IO)
      8. Placing additional campfires in other chunks and adding raw beef to them should also increase tick times. (see screenshot 03)
      9. Waiting a minute for all campfires to finish cooking should result in tick times (and disk writes) returning to the previous values (1ms ticks, no disk activity)

       

      Modder Information
      This bug was reproduced without mods - in an unmodified client, launched by the official launcher. However looking at decompiled code shows that, every tick, minecraft now attempts to save up to 20 chunks that have been modified by almost anything (block modifications, block entity "setChanged" calls (which includes inventory modification like hoppers and brewing stand recipe completion))

            timurn [Mojang] Timur Nazarov
            AlexIIL AlexIIL
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: