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

Minecraft local difficulty setting is calculated/displayed wrongly when running a world in a server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 23w31a
    • 1.17, 21w40a, 21w43a, 1.18 Pre-release 5, 1.18, 1.18.1, 23w17a
    • Java 16, windows/linux/other OS, Vanilla minecraft
    • Community Consensus
    • Dedicated Server
    • Important

      Recently it came to my attention that on a server that we played on regularly, the local/regional difficulty value in the debug menu was stuck at around 3.19-4.00, only changing because of the moon phase. This was annoying since we weren't getting mobs with better armor than gold/leather. So I have downloaded the world to see if the issue is the server or the world, and upon running the world in my singleplayer, the regional difficulty was the correct value, 6.25.

      I have verified that the difficulty is set to "Hard" in the server, and i tried switching it back to peaceful and back to hard (as well as other difficulties) but it wouldn't go past 4. At first I thought the server host was the culprit, but I downloaded the MC server JAR and I started a server with the same world and, lo and behold, the value was again 3.19. The minecraft wiki states that this value hovers between 2.25 and 6.75 in hard mode, and I have verified that my chunks are aged enough and that there's enough world time in the world, and both values are maxed out. So it turns out the value is completely wrong only on servers.

       

      update: Tried this on different OS (linux, windows) and different aged worlds, problem still persists.

       

      update: We ran some tests on spider spawning, and we found that around 5-6% (11 out of 200) of spiders that spawn have potion effects, and the clamped difficulty = 0.5 at regional difficulty = 3. And since the chance for spiders to spawn with status effects is (10 x Clamped regional difficulty %), it's safe to conclude that the regional difficulty value really is stuck at 3 and not just a display bug.

       

      update: This isn't a means to bump this issue, but im just simply adding all observations I have made. The "regional difficulty" value does not change in any other chunk, and is, apparently, global to the entire map while in a server. 

       

      How to recreate:

      1- Create a minecraft world

      2- Let it age (or just get an old world where "DAYS" in F3 screen is above 63)

      3- launch the world in singleplayer and verify that the difficulty value is around the max (~6)

      4- host a server with the same world and join in. Difficulty should be somewhere between 3-4 and never increases the more the server ages, even if chunkInhabitedTime and DayTime is maxed

       

      Here are some images to help: 

      (server)

      (singleplayer, taken in the exact same spot)

            gegy1000 [Mojang] Gegy
            buph george defented
            Votes:
            22 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: