mojira.dev
MC-10806

Stairs-block collision ray tracing method forgets to tell when it has finished.

Using MCP naming:

BlockStairs.collisionRayTrace()

...
    this.field_72156_cr = true;
    ...
    }

That flag seems to tell the method setBlockBoundsBasedOnState() that it is being used by the above method, and thus should set the bounds differently than the full block size (which it should use at other times).

The ray trace method does not reset that flag once it is done. Thus, after the player first time aims at stairs block, the flag gets set, and the bounds will always return the setup for the last stage of ray tracing after that. (Except for the ray tracer itself, which will go through the stages at each call).

As a symptom, see comments in MC-1390 (water droplets generation calculates the start height too high).

Fix

BlockStairs.collisionRayTrace()

...
        this.field_72156_cr = true;
        int var14;
        int var15;
        int var16;
        for (int var12 = 0; var12 < 8; ++var12) {
            ...
        }
        this.field_72156_cr = false; // FIX
        ...

Bug found and fix tested on version 1.4.7 while fixing MC-1390.

Comments

bugi74

Yes, code is unchanged in 1.5, at least for that functionality. (Reference for myself: func_71878_a())

Edit: silly me, forgot I can add versions to issues I've reported myself 😛

migrated

Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 ? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Ezekiel

This ticket is incomplete without the requested information, no response has been received within a reasonable time and we are assuming the issue has been resolved. Should your issue return please submit a new complete ticket with all available information.
Please review the guidelines before reporting issues.

bugi74

(Unassigned)

Unconfirmed

Minecraft 1.4.7, Minecraft 1.5, Minecraft 1.6.2

Retrieved