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

boat: visible position does not match true position in single-player

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 1.7.10
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Linux
      Java: jre1.6.0_30
      CPU: Intel core 2 quad Q6600
      GFX: nVidia Corporation GF116 [GeForce GTS 450] (rev a1)

      Affects Minecraft versions:
      1.7.10, previous 1.7.x, 1.6.x if memory serves...
    • Confirmation Status:
      Unconfirmed

      Description

      When sailing a boat for more than a very short distance, its visible position becomes very different to the position computed for collisions and other interactions.

      In the clearest example I've seen, I had been sailing in the same general direction along a broad river for less than 5 minutes. Approaching the end of the river, there was a small island about 20-25 blocks from the end. I steered well clear of this island, but about half-way between the island and the end of the river, my boat broke, depositing me on the shore of the island. The collision point was about 10 blocks to the side of the route I had taken around the island!

      In other instances, I have been unable to attack or re-enter a boat after leaving it. In a few of these cases I have been able to attack the boat (making it drop an item) by attacking along lines away from its visible position. In general, a boat which is in the water for a long time will not be enter-able at its visible position. In one case,

      I feel this is related to the much less serious bug where a drop entity may repeatedly appear to fall off the edge of a block, its true position being on the block. This is tolerable for drops, but it's not at all tolerable for boats.

      I think this is much the same bug as reported in MC-2931, but that report concerns multiplayer, while this is about single-player. In both that issue and this, the visible position of the boat is treated as low-value fluff which can be mis-computed or ignored if the game is busy. A possible explanation for it in single-player is the code ignores boat collisions if it's busy loading chunks, and then takes short-cuts when it gets around to computing the boat. My first example above could be explained by the game reducing a 20-block long, 7-10 block wide pattern of manoeuvring to a single straight line, which is not really acceptable for any player-controlled entity, never mind one as fragile as a boat.

      Another possibility is the visible location is computed by separate code from the position used for calculating collisions, and the two positions drift apart. This assumes the two positions are never synchronized, not even when the player quits and restarts Minecraft. This explains the cases of being unable to re-enter or attack a boat after leaving it by the shore, but I'm not entirely sure it fits all the cases of surprise collisions I experience. Miscalculation is more likely than you might think, even when the code looks identical. For example see what must be the most duplicated bug on gcc's bug tracker:
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                eekee Ethan "derdiggermunster" Gardener
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: