diff options
author | Linnea Gräf <nea@nea.moe> | 2024-04-26 18:04:45 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-04-26 18:15:54 +0200 |
commit | 7e0151569477df63601be50c82177ecfd21e5deb (patch) | |
tree | f30e5440a1855de92d2b424ef79339d3d6cf5f34 /src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java | |
parent | 041da7c7d179df01c4048a81ddf40a9f13c3ce77 (diff) | |
download | firmament-7e0151569477df63601be50c82177ecfd21e5deb.tar.gz firmament-7e0151569477df63601be50c82177ecfd21e5deb.tar.bz2 firmament-7e0151569477df63601be50c82177ecfd21e5deb.zip |
Bump to 1.20.5
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java b/src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java index 4db9fc0..740fbc7 100644 --- a/src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java +++ b/src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java @@ -9,6 +9,7 @@ package moe.nea.firmament.mixins.custommodels; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import com.llamalad7.mixinextras.sugar.Local; import moe.nea.firmament.features.texturepack.BakedOverrideData; +import moe.nea.firmament.features.texturepack.CustomSkyBlockTextures; import moe.nea.firmament.features.texturepack.FirmamentModelPredicate; import moe.nea.firmament.features.texturepack.ModelOverrideData; import net.minecraft.client.render.model.json.ModelOverride; @@ -38,11 +39,12 @@ public class TestForFirmamentOverridePredicatesPatch { @ModifyExpressionValue(method = "apply", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/json/ModelOverrideList$BakedOverride;test([F)Z")) public boolean testFirmamentOverrides(boolean originalValue, @Local ModelOverrideList.BakedOverride bakedOverride, - @Local ItemStack stack) { + @Local(argsOnly = true) ItemStack stack) { if (!originalValue) return false; var overrideData = (BakedOverrideData) bakedOverride; var overrides = overrideData.getFirmamentOverrides(); if (overrides == null) return true; + if (!CustomSkyBlockTextures.TConfig.INSTANCE.getEnableModelOverrides()) return false; for (FirmamentModelPredicate firmamentOverride : overrides) { if (!firmamentOverride.test(stack)) return false; |