diff options
author | SHsuperCM <shsupercm@gmail.com> | 2021-10-15 12:27:22 +0300 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2021-10-15 12:27:22 +0300 |
commit | bdfb65646744ed050205f86e3df19a239a3ba610 (patch) | |
tree | 2ed9c91d81efd5383813cdc435a502b96924403c /src/main/java/shcm/shsupercm/fabric/citresewn | |
parent | 102697939684255827620da07266089dc20572a2 (diff) | |
download | CITResewn-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.java | 3 |
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); } } |