aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-26 18:04:45 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-26 18:15:54 +0200
commit7e0151569477df63601be50c82177ecfd21e5deb (patch)
treef30e5440a1855de92d2b424ef79339d3d6cf5f34 /src/main/java/moe/nea/firmament/mixins/custommodels/TestForFirmamentOverridePredicatesPatch.java
parent041da7c7d179df01c4048a81ddf40a9f13c3ce77 (diff)
downloadfirmament-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.java4
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;