mojira.dev
MC-16663

Lead remains attached to the fence when the mob is killed

The bug

Lead remains attached to the fence when the mob is killed.

Steps to Reproduce:

  • Place down a fence and obtain a lead.

  • Summon a pig and use the lead to leash it to the fence.

  • Kill the pig and watch the leash knot closely.

Observed Behavior:
Leash knots remain attached to fences when the leashed entity is killed.

Expected Behavior:
Leash knots would not remain attached to fences when the leashed entity is killed. Instead, as soon as the leashed entity is slain, the leash knot should be destroyed.

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

MC-273030 Boats attached to a fence visually duplicated when broken Resolved MC-277547 Bug with a leash Resolved MC-278438 The lead will be still attached when we use command to kill the allay. Resolved MC-272655 Texture from the lead stays on the fence Resolved MC-109697 Leash Knot can't be broken when the connected mobs die Resolved

Attachments

Comments 39

Confirmed in 13w21b.

Doesnt really sound like a bug... seems like this should happen. as long as the mob that was killed isnt stuck on his side still tied to the post till you break it, and then disaapears.

Related to MC-15084. Both bug reports are about leashed mobs being killed.

29 more comments

Can confirm in 1.19.

Can confirm in 1.19.2.

Can confirm in 1.20.4 Release Candidate 1

That is fixed in 25w16a.

[media]

[media]

Luca Dibattista

(Unassigned)

Confirmed

Platform

Low

Entities

lead, leash_knot, mob

Snapshot 13w19a, Snapshot 13w21a, Snapshot 13w21b, Snapshot 13w26a, Minecraft 1.6, ..., 1.21 Pre-Release 3, 1.21.1, 24w35a, 1.21.3, 1.21.5

Retrieved