From 3374153bc768bb88bbf808cfa668447c91cfa0e5 Mon Sep 17 00:00:00 2001 From: minglipro Date: Mon, 14 Jul 2025 12:46:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../enchantment/conflict/config/ModConfig.java | 12 ++++++------ .../conflict/mixin/ProtectionEnchantmentMixin.java | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index b3adc1f..47dab19 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ minecraft_version=1.20.1 yarn_mappings=build.1 loader_version=0.16.10 -mod_version=1.0 +mod_version=1.1 maven_group=com.mingliqiye.minecraft.enchantment.conflict archives_base_name=enchantmentdoesnotconflict fabric_version=0.92.6 diff --git a/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/config/ModConfig.java b/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/config/ModConfig.java index 8da9670..7f8e2b7 100644 --- a/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/config/ModConfig.java +++ b/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/config/ModConfig.java @@ -23,7 +23,7 @@ public class ModConfig { private boolean allowDamageEnchantment = true; private boolean allowInfinityEnchantment = true; private boolean allowPiercingEnchantment = true; - private boolean allowProtectionEnchantmentMixin = true; + private boolean allowProtectionEnchantment = true; public ModConfig() { } @@ -87,14 +87,14 @@ public class ModConfig { this.allowPiercingEnchantment = allowPiercingEnchantment; } - public boolean isAllowProtectionEnchantmentMixin() { - return allowProtectionEnchantmentMixin; + public boolean isAllowProtectionEnchantment() { + return allowProtectionEnchantment; } public void setAllowProtectionEnchantmentMixin( boolean allowProtectionEnchantmentMixin ) { - this.allowProtectionEnchantmentMixin = allowProtectionEnchantmentMixin; + this.allowProtectionEnchantment = allowProtectionEnchantmentMixin; } public String toString() { @@ -103,7 +103,7 @@ public class ModConfig { "allowInfinityEnchantment" + "=" + allowInfinityEnchantment + "," + "allowPiercingEnchantment" + "=" + allowPiercingEnchantment + "," + - "allowProtectionEnchantmentMixin" + "=" + - allowProtectionEnchantmentMixin + ")"; + "allowProtectionEnchantment" + "=" + + allowProtectionEnchantment + ")"; } } diff --git a/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/mixin/ProtectionEnchantmentMixin.java b/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/mixin/ProtectionEnchantmentMixin.java index b4b5443..b799860 100644 --- a/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/mixin/ProtectionEnchantmentMixin.java +++ b/src/main/java/com/mingliqiye/minecraft/enchantment/conflict/mixin/ProtectionEnchantmentMixin.java @@ -20,7 +20,7 @@ public abstract class ProtectionEnchantmentMixin { @NotNull CallbackInfoReturnable cir ) { if (enchantment instanceof ProtectionEnchantment) { - cir.setReturnValue(ModConfig.getInstance().isAllowProtectionEnchantmentMixin()); + cir.setReturnValue(ModConfig.getInstance().isAllowProtectionEnchantment()); } } }