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
@unknown, 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.
Related issues
relates to
Attachments
Comments

Can confirm in 20w49a.
Can confirm in 1.16.5 and 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
Can confirm in 1.17.1.
Can confirm in 21w42a. Here are some extra details regarding this problem.
The Bug:
Fishing bobbers don't activate target blocks when making contact with their very edges.
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.
Can confirm in 1.18.1.
Can confirm in 1.18.2 and 22w11a.
Can confirm in 1.19.
Can confirm in 1.19.2.