aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.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/JsonUnbakedModelDataHolder.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/JsonUnbakedModelDataHolder.java')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.java b/src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.java
index 2de2e5e..a5bb34f 100644
--- a/src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.java
+++ b/src/main/java/moe/nea/firmament/mixins/custommodels/JsonUnbakedModelDataHolder.java
@@ -84,7 +84,8 @@ public abstract class JsonUnbakedModelDataHolder implements JsonUnbakedModelFirm
if (!this.toString().contains("minecraft") && this.toString().contains("crimson")) {
System.out.println("Found non minecraft model " + this);
}
- if (bakedModel instanceof BakedModelExtra extra) {
+ var extra = BakedModelExtra.cast(bakedModel);
+ if (extra != null) {
var headModel = getHeadModel_firmament();
if (headModel != null) {
extra.setHeadModel_firmament(baker.bake(headModel, ModelRotation.X0_Y0));