World data cache fixes
This commit is contained in:
parent
e0a9d21d59
commit
5cef3a03eb
2 changed files with 21 additions and 3 deletions
|
@ -33,9 +33,11 @@ public class DataFixerAPI {
|
|||
Collection<ModContainer> mods = FabricLoader.getInstance().getAllMods();
|
||||
for (ModContainer mod: mods) {
|
||||
String name = mod.getMetadata().getId();
|
||||
int preVersion = getModVersion(WorldDataAPI.getRootTag(name).getString("version"));
|
||||
int version = getModVersion(mod.getMetadata().getVersion().toString());
|
||||
if (version > 0) {
|
||||
shoudFix |= FIX_VERSIONS.getOrDefault(name, version) < version;
|
||||
if (version > preVersion) {
|
||||
int fixVersion = FIX_VERSIONS.getOrDefault(name, version);
|
||||
shoudFix |= fixVersion < version && fixVersion >= preVersion;
|
||||
}
|
||||
};
|
||||
if (!shoudFix) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue