Skip to content

Commit

Permalink
Fix some plants rendering double-high when they shouldn't.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaquadro committed Jan 19, 2015
1 parent 8ee36be commit 4cd89b9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ private boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block
IPlantRenderer plantRenderer = PlantRegistry.instance().getPlantRenderer(subBlock, subBlockData);
if (plantRenderer != null) {
IPlantMetaResolver resolver = PlantRegistry.instance().getPlantMetaResolver(subBlock, subBlockData);
if (resolver == null || section <= resolver.getPlantHeight(subBlock, subBlockData))
boolean shouldRender = section == 1;
if (resolver != null && section <= resolver.getPlantHeight(subBlock, subBlockData))
shouldRender = true;

if (shouldRender)
plantRenderer.render(world, x, y, z, renderer, subBlock, subBlockData, section);
}
else
Expand Down

0 comments on commit 4cd89b9

Please sign in to comment.