Cat can get off lead by teleporting when it gives a gift after sleeping
The Bug:
A cat can teleport off a lead after giving a gift in the morning. This is due to the teleport assigned to the cat after giving gifts. The teleport radius is around 5 blocks, so if the cat is already far from the lead and it then teleports, it can travel far enough to which it will break the lead.
Video:
Steps to reproduce:
1) Create a world and tame two cats.
2) Place the cats on leads and attach them to a fence.
3) Place a bed around 8-9 blocks from the fence post.
4) Sleep at night in the bed.
5) A cat can teleport off the lead (this is a low chance due to the random teleport radius, may take 5 or more times)
Linked Issues
Created Issue:
Cat can get off lead by teleporting when it gives a gift after sleeping.
The Bug:
A cat can teleport off a lead after giving a gift in the morning. This is due to the teleport assigned to the cat after giving gifts. The teleport radius is around 5 blocks, so if the cat is already far from the lead and it then teleports, it can travel far enough to which it will break the lead.
Video:
Steps to reproduce:
1) Create a world and tame two cats.
2) Place the cats on leads and attach them to a fence.
3) Place a bed around 8-9 blocks from the fence post.
4) Sleep at night in the bed.
5) A cat can teleport off the lead (this is a low chance due to the random teleport radius, may take 5 or more times)
Cat can get off lead by teleporting when it gives a gift after sleeping.
relates to
MC-202607 is still reproducible. It might simply happen less often.
How to reproduce
/fill ~ ~5 ~ ~-1 ~5 ~3 minecraft:oak_planks
/setblock ~1 ~6 ~2 minecraft:white_bed[facing=south,occupied=false,part=foot]/setblock ~1 ~6 ~3 minecraft:white_bed[facing=south,occupied=false,part=head]/setblock ~-2 ~11 ~ minecraft:oak_fence
- Tame and leash a cat
- Attach the lead to the fence
/time set midnight
- Sleep
- Repeat the sleeping process several times
Expected result
The cat would never get off the lead.
Observed result
Sometimes the cat escapes the lead. This can be annoying, particularly when you're in a house where your bed is on the second floor. The smaller the floor area, the more likely the cat is to escape the lead. Even with a larger floor, the cat can still manage to get off the lead.
Can confirm for 1.16.4-pre2 and 1.16.3
can confirm in 1.18.1