From 3ae5774cdd9ed72d829e450bb05e67244408ce96 Mon Sep 17 00:00:00 2001 From: Dennis C Date: Sun, 15 Sep 2024 21:23:00 +0200 Subject: [PATCH] [1.21.1] Fix WeightedBakedModel not calling getModelData() on the nested model (#1539) --- .../client/resources/model/WeightedBakedModel.java.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch b/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch index f96aeedb0e..3483772f34 100644 --- a/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch +++ b/patches/net/minecraft/client/resources/model/WeightedBakedModel.java.patch @@ -34,7 +34,7 @@ public boolean isGui3d() { return this.wrapped.isGui3d(); } -@@ -61,8 +_,25 @@ +@@ -61,8 +_,30 @@ } @Override @@ -57,6 +57,11 @@ + return WeightedRandom.getWeightedItem(this.list, Math.abs((int)rand.nextLong()) % this.totalWeight) + .map((p_235065_) -> p_235065_.data().getRenderTypes(state, rand, data)) + .orElse(net.neoforged.neoforge.client.ChunkRenderTypeSet.none()); ++ } ++ ++ @Override ++ public net.neoforged.neoforge.client.model.data.ModelData getModelData(net.minecraft.world.level.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, BlockState state, net.neoforged.neoforge.client.model.data.ModelData modelData) { ++ return this.wrapped.getModelData(level, pos, state, modelData); } @Override