-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Affects Version/s: None
-
Environment:
Craftbukkit 1.8 (version git-Bukkit-33d5de3) on Windows 7
Minecraft 1.8.1 with Optifine on Windows 7
Hi there,
I found a bug on visual food regen if we use World.setDifficulty() in a plugin onEnable(): the food visually keeps onEnable() difficulty even if we change it after (like using /difficulty or later World.setDifficulty).
It's really visible if we set difficulty to Peaceful at launch: food always regen visually, restoring "real" level when decreasing, then increase again.
What's the problem in a nutshell?
I have made a test plugin like this, and it makes this:
<iframe width="560" height="315" src="https://www.youtube.com/embed/YyZgqpDTKow" frameborder="0" allowfullscreen></iframe>
How to reproduice?
- Create a plugin that set default World difficulty to peaceful
- Run craftbukkit/spigot 1.8 with that plugin
- Change difficulty to normal in game
- Decrease your food level (/effect <nick> minecraft:hunger 5 20 do the job)
- Your food level will increase, like if you were in peaceful
- Move to make a food update, the real level will be set