From f095de81c232024596c3386966fd0200805cafde Mon Sep 17 00:00:00 2001 From: XFactHD Date: Wed, 16 Oct 2024 19:34:10 +0200 Subject: [PATCH] Fix standalone models not getting loaded --- .../resources/model/ModelDiscovery.java.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/patches/net/minecraft/client/resources/model/ModelDiscovery.java.patch b/patches/net/minecraft/client/resources/model/ModelDiscovery.java.patch index 49db62b4d05..7c9de8482a5 100644 --- a/patches/net/minecraft/client/resources/model/ModelDiscovery.java.patch +++ b/patches/net/minecraft/client/resources/model/ModelDiscovery.java.patch @@ -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())); + }