Server default difficulty is 1 (easy), should be 2 (normal)
The bug
The default difficulty is 1 (Easy) when it should be 2 (Normal). This is inconsistent with single player which correctly defaults to NORMAL (2).
How to reproduce
- Create dedicated server
- Open server.properties
→
Difficulty is set to 1 (Easy) and not 2 (Normal)
Code analysis
Code analysis and potential fix by [Mod] Avoma can be found in this comment.
Linked Issues
Created Issue:
Server default difficulty is 1 (easy), should be 2 (normal)
As per the title.
- Create dedicated server
- Open server.properties
- Expect difficulty=2, actually is difficulty=1
This is inconsistent with single player which correctly defaults to NORMAL (2).
As per the title.
- Create dedicated server
- Open server.properties
- Expect difficulty=2, actually is difficulty=1
This is inconsistent with single player which correctly defaults to NORMAL (2).
The bug
The default difficulty is 1 (Easy) when it should be 2 (Normal). This is inconsistent with single player which correctly defaults to NORMAL (2).
How to reproduce
- Create dedicated server
- Open server.properties
→Difficulty is set to 1 (Easy) and not 2 (Normal)
Code analysis
Code analysis and potential fix by [Mod] Avoma can be found in this comment.
is duplicated by
Thank you for your report!
We're tracking this issue in MC-136161, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Can confirm that this issue is still present in 1.16.5 and 21w15a.
Can confirm in 1.18.1.
Here's a code analysis along with a potential fix regarding this issue.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
If we look at the above class, we can see that by default, servers have their difficulty set to EASY.
Potential Fix:
Simply changing the appropriate line of code to set the default server difficulty to NORMAL, should resolve this problem. The correct line of code within its class should look something like the following:
Can confirm in 1.19.
Can confirm in 1.19.2.