diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-06 16:14:10 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-06 16:14:10 +0100 |
commit | ee21f2da76ea2218ef6a0c6fefa97befa654d115 (patch) | |
tree | aeefb78518a83d37a025673f6cadaa7d89d87449 /src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java | |
parent | ed3e9f0d70a758ac1c23c6c8d67eeb7105d13817 (diff) | |
download | Firmament-ee21f2da76ea2218ef6a0c6fefa97befa654d115.tar.gz Firmament-ee21f2da76ea2218ef6a0c6fefa97befa654d115.tar.bz2 Firmament-ee21f2da76ea2218ef6a0c6fefa97befa654d115.zip |
Fix model unwrapping
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java b/src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java index ffa59c6..dac65fe 100644 --- a/src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java +++ b/src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java @@ -24,8 +24,8 @@ public class ApplyHeadModelInItemRenderer { BakedModel model, boolean useInventoryModel, float z, CallbackInfo ci, @Local(argsOnly = true) LocalRef<BakedModel> modelMut ) { - if (transformationMode == ModelTransformationMode.HEAD - && model instanceof BakedModelExtra extra) { + var extra = BakedModelExtra.cast(model); + if (transformationMode == ModelTransformationMode.HEAD && extra != null) { var headModel = extra.getHeadModel_firmament(); if (headModel != null) { modelMut.set(headModel); |