Skip to content

Commit

Permalink
Fix standalone models not getting loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
XFactHD committed Oct 16, 2024
1 parent 2049353 commit f095de8
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,19 @@
return set;
}

@@ -77,6 +_,15 @@
}
}
);
+ // Neo: ensure standalone models registered in ModelEvent.RegisterAdditional are loaded
+ var it = set.iterator();
+ while (it.hasNext()) {
+ ModelResourceLocation mrl = it.next();
+ if (mrl.getVariant().equals(ModelResourceLocation.STANDALONE_VARIANT)) {
+ registerTopModel(mrl, getBlockModel(mrl.id()));
+ it.remove();
+ }
+ }
if (!set.isEmpty()) {
LOGGER.warn("Missing mandatory models: {}", set.stream().map(p_370354_ -> "\n\t" + p_370354_).collect(Collectors.joining()));
}

0 comments on commit f095de8

Please sign in to comment.