Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-10806

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • Minecraft 1.4.7, Minecraft 1.5, Minecraft 1.6.2
    • None
    • Unconfirmed

      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.

            Unassigned Unassigned
            bugi74 Markku
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: