▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/ModernDifficultyLocker
ModernDifficultyLocker

ModernDifficultyLocker

A UI backport mod to backport the Difficluty Lock button.

Оцените первым
303
2

1.2.0

Release19.07.2026

Список изменений

What' s changed.

Fixing repeated creation of SaveHandler covering session.lock causing save interruptions, and adding persistent per-save difficulty for unlocked archives.

Root cause: Multiple calls to getActiveAnvilConverter().getSaveLoader(name, false) create new SaveHandler for running worlds, whose constructor setSessionLock() overwrites the archive's session.lock. Subsequently, saveLevel()'s checkSessionLock() throws exceptions due to timestamp mismatch and aborts saving, causing two symptoms:

  • Archive list sorting degrades to 'creation order' (LastPlayed cannot be updated, should normally be 'recent play priority');
  • Difficulty of unlocked archives resets to default (normal) upon exiting and re-entering. These are two manifestations of the same root cause 'save interrupted'.

Fix: Change all 8 calls to create new SaveHandler to reuse the running world's server.worldServers[0].getSaveHandler() (all with worldServers null protection):

  • MixinIntegratedServer: loadAllWorlds(hardcore) and initiateShutdown are changed to reuse; startServer keeps difficulty loading deferred until loadAllWorlds completes;
  • MixinGuiOptions: hardcore auto-lock, lock confirmation, unlock confirmation are refactored to reuse via @unique helper method;
  • DifficultyLocker.onServerStarting is changed to reuse;
  • GuiWorldSettings.saveWorldData is changed to reuse.

New addition: WorldDifficultyData adds a currentDifficulty snapshot field (stored in difficultylocker.dat). On exit, record the current world difficulty; on loading, restore it, so unlocked worlds retain independent difficulty per save like 1.8+; New worlds without records do not override game default difficulty. Old archives without this key are handled as -1 for backward compatibility.

Full Changelog: https://github.com/song682/ModernDifficultyLocker/compare/v1.1.0...v1.2.0

Файлы

ModernDifficultyLocker-1.2.0.jar(31.29 KiB)
Основной
Скачать
ModernDifficultyLocker-1.2.0-deobf-sources.jar(19.57 KiB)
Скачать
ModernDifficultyLocker-1.2.0-deobf.jar(31.49 KiB)
Скачать

Метаданные

Канал релиза

Release

Номер версии

1.2.0

Загрузчики

Forge

Версии игры

1.7.10

Загрузок

92

Дата публикации

19.07.2026

Загрузил

ID версии

Главная