From 439d07e40304be5d32030e2d8b2bfdb75a72aa74 Mon Sep 17 00:00:00 2001 From: Sara Freimer Date: Tue, 20 Jun 2023 10:36:22 -0500 Subject: [PATCH] Fix custom geometry in parent models not being resolved (#9572) --- .../renderer/block/model/BlockModel.java.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/renderer/block/model/BlockModel.java.patch b/patches/minecraft/net/minecraft/client/renderer/block/model/BlockModel.java.patch index 18806a15c8..afe309ba55 100644 --- a/patches/minecraft/net/minecraft/client/renderer/block/model/BlockModel.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/block/model/BlockModel.java.patch @@ -39,17 +39,17 @@ public Collection m_7970_() { Set set = Sets.newHashSet(); -@@ -134,6 +_,10 @@ - } +@@ -160,6 +_,10 @@ + blockmodel.f_111418_ = (BlockModel)unbakedmodel; + } - public void m_5500_(Function p_249059_) { + if (customData.hasCustomGeometry()) { + customData.getCustomGeometry().resolveParents(p_249059_, customData); + } + - Set set = Sets.newLinkedHashSet(); - - for(BlockModel blockmodel = this; blockmodel.f_111419_ != null && blockmodel.f_111418_ == null; blockmodel = blockmodel.f_111418_) { + this.f_111426_.forEach((p_247932_) -> { + UnbakedModel unbakedmodel1 = p_249059_.apply(p_247932_.m_111718_()); + if (!Objects.equals(unbakedmodel1, this)) { @@ -168,11 +_,18 @@ }); }