Mojira Archive
MCM-548

[BLOCKING] Entities don't re-evaluate current target validity

Partner Rank: 

2

Partner Team Reporting:

Blockception

Verification builds:

ver 1.10.4 Release_1687717, windows
1.12.0.10
1.12.0.11.

Summary:

This has been observed on Custom entities.
The entity behaviour compoment minecraft:behavior.nearest_attackable_target, can target entities that have a certain tag. And it always switches when the current target loses the tag and a new one gains the tag. However when the current target loses the tag, but there are no other valid target, it will keep attacking the target even though it lost the tag. it doesnt re-evaluate if the current target is a valid target at any point. It does re-evaluate if the player goes to the creative gamemode and stops.

Example:

"minecraft:behavior.nearest_attackable_target": {
 "priority": 1,
 "within_radius": 128,
 "reselect_targets": true,
 "entity_types": [ 
 { 
 "filters": \{ "any_of": [ { "test": "has_tag", "subject": "other", "value": "EntityFollow" } ] },
 "max_dist": 128
 } 
 ],
 "must_see": false,
 "must_see_forget_duration": 0.5,
 "scan_interval": 20
}

Impact:

This is a blocking part in a couple of ours maps, as it is vital that entities need to stop attacking the target. It is stopping from releasing a couple of our maps.

Repro Steps:

A zombie can be spawned and then moved to either the armor_stand on the left or on the right depending which button you press. the lights indicate if the armorstand has the specified tag or not. when the zombie steps over the redline the tag is removed from the armor_stand, which should trigger in the zombie to stop. If the zombie keeps attacking then it hasn't re-evaluates it target properly. this is done with the example behaviour up above

Observed Results:

the entity keeps attacking

Expected Results:

At some point after it completed it paths, or searching for other target it should re-evulaute its current target and thus stop moving.

Screenshots/Videos attached: No

Regression Builds:

  • Never? No idea

Notes:

I would love for minecraft:behavior.nearest_attackable_target to receive a:
Re-evaluate_target property that defaults to false. This way it all entities will have the old behaviour but creators can turn it on when they need to
 

Unresolved

Daan Verstraten

2019-03-01, 10:18 AM

2019-06-14, 08:33 PM

0

0

entity

Future Release

-