mojira.dev
MC-695

Wolves will not stop growling & now despawned - Can be closed

When I killed a tamed wolf from 1.3.2 the wolves from 1.4.2 will not stop growling and snarling. In addition, the wolves from 1.3.2 cannot be made to stand using right click but, will accept food.

I tried reloading Minecraft but, that only caused three of my 1.4.2 wolves to despawn and the one remaining will not quit with the growling/snarling.

Comments

Erin Mc Innis

Additional Notes:

The original (blue collar) 1.4.2 wolves have all despawned when I left to find move wolves.
The 1.3.2 pair of wolves are still where I left them and not despawned nor can they be moved.

Kevin

I can confirm this and explain what's happening. When a wolf is hurt by a player that isn't its owner, the wolf will automatically set any nearby wolves angry. This includes tamed wolves, as the mob behavior is generic (I believe it also works for Zombie Pigmen) and does not check if a tameable mob is tamed.

Since the tamed wolves are now angry, this causes them to growl. Additionally, the "canDespawn" function in the EntityWolf file only checks if the wolf is angry, and not if it is tamed.

This can be fixed with a couple of changes:
1. In the EntityWolf file, the canDespawn() function should return "isAngry() && !isTamed()"
2. The "hurt by target" mob behavior should check if surrounding tameable mobs are tamed before setting their attack targets
3. Tamed wolves should should never be able to be angry at a player

You can get a better sense of this by spawning a couple of wolves in creative, taming them, and then spawning some more wolves and hitting them. Eventually some of your wolves will start growling, and if you move far enough from them they'll despawn.

Apologies if the function/file names are not entirely obvious, I was digging through deobsfucated code. Hopefully they should be descriptive enough so that you can find the relevant functions.

Erin Mc Innis

I probably should have mentioned this previously, the tamed wolves did belong to me as it was a single player game started 1.3.2 which, when 1.4.2 came out I attempted to load and play. As this was the first time I'd attempted a single player I guess 'conversion' from 1.3.2 to 1.4.2, something in the code changed. When I returned to trying to play the file in 1.3.2, the original wolves from 1.3.2 did not respond to right clicking nor did the ones from 1.4.2. Though I expected the 1.4.2 ones to not obey.

Since then I have started a new file in 1.4.2. However, maybe it was not a bug at all as I guess wolves do not convert from version to version. I must admit though, I found the other mobs: cows, pigs, sheep and chickens worked just fine. Must be related to taming and ownership.

Kevin

Wolves will convert as long as you are logged in. This is another issue where wolves recognize players by username, and when logged out the game will not remember your info and instead treat your username as "Player".

If you switch between versions where you were logged in/offline the wolves tamed offline won't recognize you when you're logged in and vice versa.

Erin Mc Innis

Oh, so that was the problem! I never knew that had any effect. I never started playing on/offline until the 1.3.2/1.4.2. conversion so I thought it was linked to that and the mode. Well, I guess that solves this problem. Thanks for your help!

Tails

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Erin Mc Innis

(Unassigned)

Unconfirmed

Minecraft 1.4.2

Retrieved