World.getHighestBlockYAt returns Y of block above the top non-air block instead of Y of the top non-air block

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None

      Documentation of World.getHighestBlockYAt says:

      Gets the highest non-air coordinate at the given coordinates
      

      But it actually returns Y of the block above. It also ignores trasparent block (opacity == 0). So the result is that if the top block is tall grass or snow it correctly returns Y of the top block, but if it's not - it returns Y of the block above.

      It also causes world.getHighestBlockAt to return incorrect block.

      This behavior has been there for a long time and all plugins using these methods probably already rely on the wrong behavior (at least my plugin does and it would break if the behavior changed).

            Assignee:
            Unassigned
            Reporter:
            Bartosz Skrzypczak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: