-
Bug
-
Resolution: Unresolved
-
None
-
1.19.51, 1.19.60
-
Confirmed
-
Multiple
-
965367
The Bug
The "on_unleash" trigger in entity component "minecraft:leashable" executes the given event twice in some cases.
Way to Unleash | Glitch? |
---|---|
Right click the mob | Yes |
Run out of range of leash | No |
Kill the mob | No |
Tie on fence and untie | No |
Steps to Reproduce
Load the attached world "TestOnUnleash.zip" and leash the cow. The world includes an add-on which let the cow send a message in chat either when it gets leashed or unleashed.
"minecraft:leashable": { "soft_distance": 4.0, "hard_distance": 6.0, "max_distance": 10.0, "on_leash": { "event": "test:on_leash" }, "on_unleash": { "event": "test:on_unleash" } }
"events": { "test:on_leash": { "run_command": { "command": ["say on_leash"] } }, "test:on_unleash": { "run_command": { "command": ["say on_unleash"] } } }
Expected Result
The "on_unleash" message should be printed once when the cow is unleashed.
Observed Result
The "on_unleash" message is printed twice when the cow is unleashed in the condition described in the table above.