mojira.dev
MC-12427

Mobs get stuck in the North-West corner of a fence

In forest hills: When farming farm animal mobs one mob is "stuck" in the NW corner of a fenced area.

Steps to reproduce
1. Create a corner fence that is pointing to the north-west.
2. Spawn a mob and push it into the corner.
3. It won't be able to get out of there.

Related issues

Attachments

Comments

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

I see this regularly... chickens get stuck in corners and chicks seem to get stuck on any fence post.

The chickens won't even leave the corners when shown seeds.

migrated

To me it looks like all animals are “attracted” by fences. I almost never see them wandering around in the fenced area but touching the fences more or less all the time.

migrated

It doesn't matter what type of farm mob it is.

I've got sheep, cows, chiduckens and pigs all in separate pens (wooden fence.) One mob of each is stuck in the NW corner and only the NW corner. If you attempt to lure or breed with respective food--they cannot be lured and the other mob must come to them for the breeding to work. If you punch or attack the mob with a tool or weapon, it will not move or run.

migrated

Still happening in 1.5.1 – Added screen shot.

Torabi

Related to MC-4661, possibly MC-12000. Probably caused by the AI attempting to find a path to a point on the other side of the fence. The directional bias could be a result of the search algorithm.

migrated

I've noticed this too, there is always one animal that manages to get itself stuck in the NW corner of the fenced area. Tried to fix this by putting sand in the corner and while they don't get stuck anymore with that, they still try to cram into any NW corner of a fenced area.

So it's partially a hitbox issue and partially a pathing issue.

Version 1.5.1

migrated

Confirmed in 13w21a. In the screenshot I pushed the creeper into the north-west corner, now he's stuck and cannot chase me eventhough I'm in survival.

migrated

I really want this to get fixed because I make my farms in circular shapes and they have a lot of north-west fence corners in it.

migrated

Still happens in Minecraft 1.6.2.

kumasasa

The source of this behaviour may be MC-10046 (Random destination routine has a small statistical tendency to move more north west (fix included)) followed by MC-4661 (Chickens (And small mobs) cannot path when standing in/next to walls)

migrated

@Kumasasa
You are somewhat right. Actually, the exact source for this (and MC-4661) is explained in a separate bug report I made (MC-21109) which encompasses quite a few different issue all caused from the same flaw that pathfinding is heavily grid-based while movement is not. It is not one little bug but rather a conceptual flaw in the coding that sometimes mobs can pathfind when they cannot move somewhere and cannot pathfind when they can move somewhere. Obviously, whether a mob thinks it can move and whether it can move should always agree. The reason no mobs (including large ones) can pathfind out of northwest corners is because their pathfinding algorithm begins pathfinding from the block which contains their minimum x and z bounding box coordinates. Then, beginning from inside the fence block, they pathfind in a totally grid-based way and conclude their only possible paths lead through the fence they are stuck against.

migrated

Could this possibly have something to do with the hitbox on corner fences not being contoured to a corner shape?

migrated

Carl, I reported this bug of the chickens in MC-3288.

migrated

Mobs still get stuck in fences in the version 1.6.4.

migrated

Still happening in 1.7.2

migrated

Still happens in 1.7.4

migrated

Happens to me in 1.7.4 server. NW seems to be the favorite, but also happens in other corners with my chickens at least. Also, my sheep get stuck on all pieces, not just the corners.

http://imgur.com/owl2o72

http://imgur.com/wrToPs3

http://imgur.com/IUBQlqy

kumasasa

Is this issue co-fixed with MC-10046 since 14w02a ?

migrated

Confirmed in 14w06b.

migrated

I think it happens because mobs think they are inside a block, and they actually are, but, they are inside the hitbox of the block, but not inside the collision box.

migrated

Having this problem on 14w08a with chickens, cows, sheep, and pigs. Seen other people mention others do this too.

AgentM

Still an issue in 14w27a/b
high annoyance, sheep won't come up to the fence to be bred, need to open fence gate, go inside, reach the sheep and right click it...

migrated

Note that this bug is also probably what allows the current piston-less glass item elevators to work. Enities can go into the fence block, but then they want to rise up into the item elevator as they are now 'inside' a block.

Chickens stuck in a fence corner will lay eggs but the eggs are 'ejected' from that fenced block.

For sheep and cows, placing carpet on top of the fence post in the corner stops the issue, as they hit the carpet collision box.

migrated

it is affecting the 1.8, but i don't know about the 1.8.1-pres.

galaxy_2alex

Reopened, thanks

TheTamedWolf

I agree with Matthew Sladen about the hitboxs for the fences. I am using 1.8.2pre6. Its like the small mobs are small enough to go inside the block without suffocating. For now I just make a 2 block high corner with stone or wood.

migrated

Why is this not a duplicate of MC-4661? How are they different?

TheTamedWolf

Huh, good point.. They are the same. lol maybe they didn't catch it, or a difference we don't see.

migrated

Well, they already have it marked as related, so they do know about it. I think that they are keeping them separate since this report is about the north-west corner specifically, and MC-4661 is about fences and walls in general. I'm guessing that they are actually the same bug, and it's just a coincidence that he noticed them in the north-west corner. (Or possibly there is an unrelated bias in the mob movement random direction generator?)

kumasasa

The bias was fixed with MC-10046 . This issue (and MC-4661) seems to be a pathfinding issue (depending on what order the AI tries to move the mobs)

migrated

But why are they classified as separate bugs? Aren't they the same thing?

kumasasa

May be the same thing, but this issue isn't specific to small mobs like chickens, also cows, pigs, sheep get stuck in NW corners.

TheTamedWolf

Ah i see, yeah I noticed that even horses got stuck too.

migrated

The bug occurs with larger mobs too, it's just that with a larger hitbox, the mob is unable to have its center point inside the fence block, so we don't notice it.

migrated

This is currently the most annoying bug in minecraft there is to find.
Everything gets stuck in this famous NW corner of any type of fence, any height, any location..

The recently implemented Rabbits also get stuck. More Frequently than Chickens do, even...

migrated

^Indeed, rabbits are the biggest problem of all. I have had around 75 rabbits in a pen for a while, and recently I noticed that most of them had gone "missing". After inspecting their enclosure, I realized that about 50 of them had all become lodged in a northwest corner of the fencing.

shufboyardee

Seems to be fixed in 16w07a (and going back to 15w49b, maybe 'a').

migrated

From extended observations on mobs, animals and villagers alike, all prefer selecting 'north west' (if you live in the northern hemisphere) wandering directions. Whether in a pen, or on an island, or as part of a village, within a cavern, or what have you.

This seems to be a preference in direction, or an absence of preference in the south east, for all common AI wandering behavior. Clearly this behavior was meant to select an apparent random direction.

Computer science tells us 'random' is rarely truly random; and in this case, the technique employed may require further testing to confirm proper results.

Most recently observed in a village: all villagers dispersed evenly upon discovery, and by the fifth day, all villagers in the north west region.

Windows Minecraft 1.10.2
'Hope that helps.

migrated

Um, this is still an issue... or it came back somehow. I get one of any type of animal stuck in the North West corner of a fenced in area if there is more than one type of animal in the area (I have just one donkey in a fenced in area and it's not stuck yet, but I have just 2 horses and one is always in the NW corner). I don't know if I should open a new ticket or if this can be reopened... I'll leave this comment for now and if it doesn't reopen in a week I'll submit a new one since I don't see any new bugs with this description.

migrated

I've seen my chickens getting stuck in ALL corners of a fenced in area.

migrated

(Unassigned)

Confirmed

animal, chicken, corner, cow, mob, north, pig, sheep, west

Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w19a, Snapshot 13w21a, ..., Minecraft 14w27b, Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.8, Minecraft 15w45a

Minecraft 16w07a

Retrieved