Fix custom geometry in parent models not being resolved (#9572)

This commit is contained in:
Sara Freimer authored and GitHub committed 2023-06-20 17:36:22 +02:00
1 parent 1ad8d48683
commit 439d07e403
1 file changed
+6 -6
@@ -39,17 +39,17 @@
public Collection<ResourceLocation> m_7970_() {
Set<ResourceLocation> set = Sets.newHashSet();
@@ -134,6 +_,10 @@
}
@@ -160,6 +_,10 @@
blockmodel.f_111418_ = (BlockModel)unbakedmodel;
}
public void m_5500_(Function<ResourceLocation, UnbakedModel> p_249059_) {
+ if (customData.hasCustomGeometry()) {
+ customData.getCustomGeometry().resolveParents(p_249059_, customData);
+ }
+
Set<UnbakedModel> 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 @@
});
}