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

Fishing rod bobbers don't activate a target if shot on the very edge

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • None
    • 20w15a, 20w16a, 20w17a, 20w18a, 20w19a, 20w20a, 20w20b, 20w21a, 20w22a, 1.16 Pre-release 2, 1.16 Pre-release 3, 1.16 Pre-release 4, 1.16 Pre-release 5, 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, 1.16.2 Pre-release 1, 1.16.2 Pre-release 2, 1.16.2 Pre-release 3, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3, 1.16.4 Pre-release 2, 1.16.4 Release Candidate 1, 1.16.4, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w07a, 1.17.1, 21w42a, 1.18.1, 1.18.2, 22w11a, 1.19, 1.19.2, 23w04a
    • Confirmed
    • Projectiles
    • Low

    Description

      The Bug

      Fishing rod bobbers usually activate targets, but if the bobber is shot on the very edge of the target, no signal is output.

      Steps to Reproduce

      • Align yourself at the center of a block and summon both a redstone lamp and target block.
        /execute align xyz run tp @s ~0.5 ~ ~0.5
        /setblock ~ ~ ~3 minecraft:target
        /setblock ~ ~1 ~3 minecraft:redstone_lamp
        
      • Obtain a fishing rod and angle yourself perfectly.
        /tp @s ~ ~ ~ -12 21
        
      • Throw the fishing bobber.
      • Take note as to whether or not fishing bobbers activate target blocks when making contact with their very edges.

      Observed Behavior

      Fishing bobbers don't activate target blocks when making contact with their very edges.

      Expected Behavior

      Fishing bobbers would activate target blocks when making contact with their very edges.

      Code Analysis

      TriWonder81, Using Yarn mappings, 22w11a

      The problem here is that a raycast is created at the position of the fishing bobber at the method net.minecraft.entity.projectile.ProjectileUtil#getCollision(). This raycast is pointed in the direction of the bobber and is used to get the collision on the block. However, because the bobber is slightly larger than other projectiles, this raycast actually misses the block when the bobber hits the edge of the target block because the raycast starts at the center of the bobber. This is likely also the cause of MC-199197.

      Attachments

        1. 2020-04-14_17.30.27.png
          2020-04-14_17.30.27.png
          1.39 MB
        2. 2020-04-14_17.53.18.png
          2020-04-14_17.53.18.png
          839 kB
        3. MC-178723.mp4
          4.30 MB
        4. MC-178723.png
          MC-178723.png
          785 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              TriWonder81 [Mod] Chandler
              Votes:
              6 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                CHK: