Mojira Archive
MC-112642

y coordinate based rendering offset not working

Based on 1.11.2 decompiled using MCP 9.35 rc1

The bug

Blocks which define net.minecraft.block.Block.EnumOffsetType.XYZ as rendering offset are not offset in y direction based on their y coordinate.

Affected blocks

Last updated for 1.11.2

  • tallgrass

How to reproduce

  1. Place one of the affected blocks at 0 9 -3
  2. Place one of the affected blocks at 0 7 -3
    → You will see that both blocks are at the same height, while the upper one should be rendered lower

Code analysis

The problem is that the method net.minecraft.block.Block.func_190949_e(IBlockState, IBlockAccess, BlockPos) calls the method net.minecraft.util.math.MathHelper.getCoordinateRandom(int, int, int) always with 0 as y parameter value while it should use the block's y coordinate.

Works As Intended

Marcono1234

2017-01-20, 02:05 AM

2020-08-23, 09:08 PM

2017-01-20, 06:34 PM

1

1

Confirmed

block-rendering, offset, position, rendering, tall-grass, y-coordinate

Minecraft 1.11.2

-