aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-10-15 12:27:22 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-10-15 12:27:22 +0300
commitbdfb65646744ed050205f86e3df19a239a3ba610 (patch)
tree2ed9c91d81efd5383813cdc435a502b96924403c /src/main/java/shcm/shsupercm/fabric/citresewn
parent102697939684255827620da07266089dc20572a2 (diff)
downloadCITResewn-bdfb65646744ed050205f86e3df19a239a3ba610.tar.gz
CITResewn-bdfb65646744ed050205f86e3df19a239a3ba610.tar.bz2
CITResewn-bdfb65646744ed050205f86e3df19a239a3ba610.zip
Global Properties' useGlint
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemStackMixin.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemStackMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemStackMixin.java
index 4834a76..033bf8e 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemStackMixin.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemStackMixin.java
@@ -5,6 +5,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
+import shcm.shsupercm.fabric.citresewn.CITResewn;
import shcm.shsupercm.fabric.citresewn.config.CITResewnConfig;
import shcm.shsupercm.fabric.citresewn.pack.cits.CITEnchantment;
@@ -29,7 +30,7 @@ public class ItemStackMixin implements CITEnchantment.Cached {
@Inject(method = "hasGlint", cancellable = true, at = @At("HEAD"))
private void disableDefaultGlint(CallbackInfoReturnable<Boolean> cir) {
- if (CITEnchantment.shouldApply && CITEnchantment.appliedContext != null && !CITEnchantment.appliedContext.get(0).useGlint)
+ if (CITResewn.INSTANCE.activeCITs != null && ((!CITResewn.INSTANCE.activeCITs.effectiveGlobalProperties.useGlint) || (CITEnchantment.appliedContext != null && CITEnchantment.shouldApply && !CITEnchantment.appliedContext.get(0).useGlint)))
cir.setReturnValue(false);
}
}