mojira.dev
MC-178723

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

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

Attachments

Comments

migrated
[media][media][media][media]
Avoma

Can confirm in 20w49a.

Avoma

Can confirm in 1.16.5 and 20w51a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w07a.

Avoma

Can confirm in 1.17.1.

Avoma

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.

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2 and 22w11a.

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.2.

Chandler

(Unassigned)

Confirmed

Gameplay

Low

Projectiles

fishing_bobber, fishing_rod

20w15a, 20w16a, 20w17a, 20w18a, 20w19a, ..., 23w04a, 1.19.4, 23w18a, 1.20.1, 1.21

Retrieved