diff --git a/src/main/java/uk/debb/vanilla_disable/mixin/advancement/MixinPlayerAdvancements.java b/src/main/java/uk/debb/vanilla_disable/mixin/advancement/MixinPlayerAdvancements.java index fc4b3d2d..f1234bc5 100644 --- a/src/main/java/uk/debb/vanilla_disable/mixin/advancement/MixinPlayerAdvancements.java +++ b/src/main/java/uk/debb/vanilla_disable/mixin/advancement/MixinPlayerAdvancements.java @@ -14,10 +14,12 @@ public abstract class MixinPlayerAdvancements implements Maps { @ModifyReturnValue(method = "getOrStartProgress", at = @At("RETURN")) private AdvancementProgress cancelPerformingCriterion(AdvancementProgress original, Advancement advancement) { if (advancement.getDisplay() != null) { - Gamerules gameRule = playerAdvancementsStringMap.get(advancement.getDisplay().getTitle().toString().split("'")[1]); - if (!Gamerules.ADVANCEMENTS_ENABLED.getBool() || (gameRule != null && !gameRule.getBool())) { - return new AdvancementProgress(); - } + try { + Gamerules gameRule = playerAdvancementsStringMap.get(advancement.getDisplay().getTitle().toString().split("'")[1]); + if (!Gamerules.ADVANCEMENTS_ENABLED.getBool() || (gameRule != null && !gameRule.getBool())) { + return new AdvancementProgress(); + } + } catch (ArrayIndexOutOfBoundsException ignored) {} } return original; } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 33851fd7..d7169591 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, "id": "vanilla_disable", - "version": "2.4.0", + "version": "2.4.1", "name": "Vanilla Disable", "description": "Allows you to disable a lot of vanilla features.", "authors": [