If one spawns the following skeleton ~8-15 blocks y level above an iron golem at ground level (e.g:atop a small castle wall):
/summon skeleton ~ ~ ~ {HandItems:[{id:"minecraft:bow",Count:1b},{}],Attributes:[{Name:generic.followRange,Base:100}]}
Then the skeleton will sit endlessly on top of its perch until it is moved to a location within about 5 meters altitude of the Golem. It will then begin attacking the target.
This never happened in older versions of minecraft (although I can't provide exact versions, I used the attribute a lot) and really hampers map-making ability.
The followRange
attribute seems rather buggy in general. In one instance, the skeleton targeted his enemy after being punched by me, in creative mode, and in another, a skeleton began pursuing one of the golems from a long distance, only to lose interest once he got close, possibly due to a small hill that was in his path.
Comments 6
Confirmed
Based on mcp940-pre1, minecraft version 1.12, the method bq.EntityAINearestAttackableTarget.getTargetableArea is defined as follow :
//targetDistance is the follow range
protected AxisAlignedBB getTargetableArea(double targetDistance)
{
return this.taskOwner.getEntityBoundingBox().expand(targetDistance, 4.0D, targetDistance);
}
And indeed the BoundingBox y expansion is always a constant 4.0, regardless of the follow range.
I'm slightly confused by this. Is this confirmed as unintended or is it a feature?
@unknown confirmed that what you said actually is the case and checked what piece of code causes it and posted it.
Whether this is a bug or not still needs to be confirmed by a Mojang developer.
[Helper] mrpingouin1 confirmed that what you said actually is the case and checked what piece of code causes it and posted it.
Whether this is a bug or not still needs to be confirmed by a Mojang developer.
Ok, thanks for the help. I've never used the issue tracker before now, hence my slightly stupid question.
Confirmed
Based on mcp940-pre1, minecraft version 1.12, the method EntityAINearestAttackableTarget.getTargetableArea is defined as follow :
And indeed the BoundingBox y expansion is always a constant 4.0, regardless of the follow range.