aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-06 16:14:10 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-06 16:14:10 +0100
commitee21f2da76ea2218ef6a0c6fefa97befa654d115 (patch)
treeaeefb78518a83d37a025673f6cadaa7d89d87449 /src/main/java/moe/nea/firmament/mixins/custommodels/ApplyHeadModelInItemRenderer.java
parented3e9f0d70a758ac1c23c6c8d67eeb7105d13817 (diff)
downloadFirmament-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.java4
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);