Pass IModelData through IForgeBakedModel#getModelData() before asking the IBakedModel for the particle texture (#8107)

This commit is contained in:
Dennis C authored and GitHub committed 2021-11-20 15:52:26 +01:00
1 parent 56f4300117
commit 2c36b306a4
1 file changed
+3 -2
@@ -1,6 +1,6 @@
--- a/net/minecraft/client/renderer/BlockModelShapes.java
+++ b/net/minecraft/client/renderer/BlockModelShapes.java
@@ -24,8 +_,14 @@
@@ -24,8 +_,15 @@
this.field_178128_c = p_i46245_1_;
}
@@ -12,7 +12,8 @@
+
+ public TextureAtlasSprite getTexture(BlockState state, net.minecraft.world.World world, net.minecraft.util.math.BlockPos pos) {
+ net.minecraftforge.client.model.data.IModelData data = net.minecraftforge.client.model.ModelDataManager.getModelData(world, pos);
+ return this.func_178125_b(state).getParticleTexture(data == null ? net.minecraftforge.client.model.data.EmptyModelData.INSTANCE : data);
+ IBakedModel model = this.func_178125_b(state);
+ return model.getParticleTexture(model.getModelData(world, pos, state, data == null ? net.minecraftforge.client.model.data.EmptyModelData.INSTANCE : data));
}
public IBakedModel func_178125_b(BlockState p_178125_1_) {