mojira.dev
MC-68265

Rabbits continue to follow the player even once they are in breeding mode

Now that rabbits no longer need to be tamed in order to be bred, I'd expect them to behave somewhat like pigs.

When right-clicking a pig that's following you with a carrot, the pig stops following you and finds a mate.
Rabbits keep staring at the player with the heart particles popping up on top of them and won't breed until the player either goes away or changes the item it's holding.

(thought rabbits teleported, but we've stablished that it was just me being a derp, so I retracted this part of the bug report)

Related issues

Comments

migrated

Confirmed.

migrated

Issue still exists in 14w34d.

migrated

I mentioned this in MC-65991.

Also, rabbits don't teleport...

migrated

Jonathan, if Rabbits are to be a resource like Sheep, Pigs and Cows, they need to not teleport. I hope that this new non-teleporting Rabbit is the actual way the Rabbits are supposed to behave. If not, Rabbits will be a very difficult animal to gather resources from.

migrated

There's nothing strange about rabbit behavior in 14w34d at all except for the minor issue of not breeding if still captive by carrots, as this ticket and MC-65991 describes.

If an animal can't be tamed, it's not supposed to, or intended to teleport. OP says that rabbits are teleporting in 14w34d, which is impossible. An explanation would be helpful from OP.

migrated

Okay so I tested it again, and the rabbits indeed are NOT teleporting. It seemed to me that they were because they were escaping from the fence pane I built. But they are scaring because they can jump higher than 1.5 blocks (which I'm guessing is an intended behaviour?).

So yeah, sorry about the wrong report, they do not teleport. Raising the fences another block high guarantees that the rabbits stay in.

The other problem is still valid though. They don't breed if there's anyone around holding a carrot.
If I were to guess what the problem is AI priority. The AI that determines if the rabbit should follow a player has higher priority than the one that says it should mate.

migrated

Rabbits cannot escape standard fences.

migrated

After looking at the code I believe my initial guess was indeed correct.

Code extract from the pig class:
this.i.a(3, new ys(this, 1.0D)):
this.i.a(4, new aaf(this, 1.2D, amh.bY, false)):
this.i.a(4, new aaf(this, 1.2D, amh.bR, false)):

Code extract from the rabbit class:
this.i.a(2, new aaf(this, 1.0D, amh.bR, false));
this.i.a(3, new ys(this, 0.8D)):

"aaf" is the AI that determines that the entity should follow a player holding an specific item (Carrot on a stick and carrots for pigs, and just carrot for rabbits).
"ys" is the AI that makes the entity mate.

As you can see, the mating AI has a smaller priority (smaller means it gets executed first) than the follow AI on the pig,
But, on the rabbit, the follow AI has a smaller priority than the mating AI. Therefore the rabbit will attempt to follow before mating.

migrated

Jonathan Hynes, they do escape if you have carpets on top of them. Other entities don't.
But that's probably because rabbits naturally jump around whereas pigs and cows don't unless they feel like they have to. So yeah, probably not a bug 🙂

migrated

If carpets allow for escape, the rabbit jump height might just be oversight then. It seems intentional that fences are high enough; maybe they forgot about carpet height.

Edit: oh, do you mean carpets on top of the fences?

migrated

yup, I placed carpets on top of the fences so that I could jump in and out but the animals would stay in.
This seemed to have allowed rabbits to also jump out, but other animals remain trapped. But like I said before, this probably isn't a bug, just a consequence of a hopping personality of the rabbits 😛

migrated

Oh duh that makes a lot of sense. I'm not one to utilize MC physics quirks on a regular basis.

migrated

It may have been a fluke, but in the recent snapshots, if you place carpet on fences like many do to allow player access but not animal, animals seem to be able to jump the fence with the carpet as well.

I found this out the hard way after penning a bunch of sheep in with fences and carpets on top. I found them all over the place a few minutes later and saw them climbing on to the carpet just like players can. I stopped that practice right after that.

I now place all my animals, including rabbits, in 2 deep pits with a single ladder on the upper block. They don't escape due to chunk loading are just as easy to access as the carpet on fence trick.

I may need to revisit this to see if this behavior has changed again, but it was a real sore spot with me earlier.

migrated

I can confirm in 1.8-pre1 release, when breeding rabbits, they stay in "captive" mode after feeding them carrots, until the player switched the item in hand. This does not seem intended, as pigs will breed even while the player is still holding carrots.

migrated

Also David, I can confirm that rabbits, as well as other mobs, (less frequently though) are able to jump over fences with carpets on them in the 1.8-pre1 release. Do you know if there is a separate bug report for that yet? I would like to up vote it.

Edit: Added snapshot version.

migrated

It's hard to say if this has been reported since I wouldn't have called carpets on fences something that would hold passive mobs in. Since a player can jump onto such a fence, I would expect a mob to be able to as well. The fact that they were not able to in earlier releases doesn't make this a feature that would be considered a bug if that behavior changed later.

I just checked the 1.8-pre snapshot and put carpet on top of a fence pen, placed 2 of each passive mob in and gave myself wheat and carrots. With the carpets on, I used the mob's breeding food to try to entice them out of the pena and all but the rabbits were not able to escape the pen. (I really expected the other animals (no chickens) to be able to escape as well.) I then took the carpet off the fence and none of the animals were able to escape, even the rabbits.

migrated

Rabbits can no longer be tamed...

migrated

Confirmed for 1.8.1-pre3
Both carrots and dandelions do this.

migrated

Confirmed for 1.8.1 with carrots.

migrated

Can confirm for 1.8.2-pre1

migrated

Confirmed for Carrots and Dandelions in 1.8.7

migrated

Affects 15w31a.

migrated

Can someone check if this was fixed? I think the wiki indicated that it was, but I can't play the game right now.

migrated

Is this still an issue in 15w47c?

migrated

Confirmed fixed.

migrated

(Unassigned)

Confirmed

Minecraft 14w34a, Minecraft 14w34b, Minecraft 14w34c, Minecraft 14w34d, Minecraft 1.8-pre1, ..., Minecraft 1.8.1, Minecraft 1.8.2-pre1, Minecraft 1.8.7, Minecraft 15w31a, Minecraft 15w32a

Minecraft 15w47c

Retrieved