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-109697 Leash Knot can't be broken when the connected mobs die Resolved MC-133896 leads entity stays on fence if you kill the mob that the lead is attached to Resolved MC-157433 Lead stays on fence while creature is dead. Resolved MC-179799 Leash knots bug Resolved MC-182985 Lead Knot Entities that have nothing connected to them will desapear on reload. Resolved

Attachments

Comments 38

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.

Jerry Gabriel Rivas Zarete

Confirmed in 1.6.1

MisterSanderson

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

Duplicate of MC-14004.

28 more comments

Can confirm in 1.18.2 and 22w18a.

Can confirm in 1.19.

Can confirm in 1.19.2.

In 1.20.3

Can confirm in 1.20.4 Release Candidate 1

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