The bug
Wild wolves smell the bone but don't tilt their heads,while tamed wolves don't want bones and tilt their heads anyway.
Code analysis
The following is based on a decompiled version of MC 1.12.2 using MCP 9.40.
This issue is caused in the method net.minecraft.entity.ai.EntityAIBeg.hasTemptationItemInHand()
because in one of the if-statements it checks if the wolf is tamed, if the wolf is not tamed, the wolf won't beg.
private boolean hasTemptationItemInHand(EntityPlayer player)
{
for (...)
{
ItemStack itemstack = player.getHeldItem(enumhand);
//Here it checks if the wolf is tamed, to fix change to '!this.wolf.isTamed()'
if (this.wolf.isTamed() && itemstack.getItem() == Items.BONE)
{
return true;
}
if (..)
{
..
}
}
return false;
}
To fix this, the isTamed
boolean will need to be negated in the if-statement.
Linked issues
is duplicated by 5
Attachments
Comments 55
My edition of the description and title was more correct,wild wolves always tilt their head for meat,it is intended
As of 1.21, wild wolves now beg for bones. At least that part of this problem is resolved.
Is it intentional that tamed wolves also beg? To what others have said, they don't consume them, so I wouldn't think that they should.
As of 1.21.4, wild wolves now tilt their heads, so this should be changed to "tamed wolves are still interested in bones" or "tamed wolves don't take bones" etc. This issue needs to be closed if the current behavior is intended.
I hope it is not intended