Skip to content

Commit

Permalink
Fix render type from model JSON being ignored
Browse files Browse the repository at this point in the history
XFactHD committed Oct 16, 2024

Verified

This commit was signed with the committer’s verified signature.
XFactHD Dennis C
1 parent f095de8 commit b8a868a
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -58,6 +58,19 @@
for (BlockElement blockelement : this.getElements()) {
for (Direction direction : blockelement.faces.keySet()) {
BlockElementFace blockelementface = blockelement.faces.get(direction);
@@ -161,7 +_,11 @@
}
}

- return simplebakedmodel$builder.build();
+ var renderTypes = net.neoforged.neoforge.client.RenderTypeGroup.EMPTY;
+ if (this.customData.getRenderTypeHint() != null) {
+ renderTypes = this.customData.getRenderType(this.customData.getRenderTypeHint());
+ }
+ return simplebakedmodel$builder.build(renderTypes);
}
}

@@ -229,7 +_,18 @@
ItemTransform itemtransform5 = this.getTransform(ItemDisplayContext.GUI);
ItemTransform itemtransform6 = this.getTransform(ItemDisplayContext.GROUND);

0 comments on commit b8a868a

Please sign in to comment.