Mojira Archive
MCM-721

"must_see_forget_duration" from behavior "minecraft:behavior.nearest_attackable_target" doesn't work for custom entities.

Partner Rank:
    3 - Normal
Partner Team Reporting:
    Shapescape
Verification builds:
    1.12.0.25
Summary:
    "must_see_forget_duration" from behavior "minecraft:behavior.nearest_attackable_target" doesn't work for custom entities. The entity can't lose the target even if the "must_see" property is set to true and the target is behind a wall (however the target can be aquired only when its visible which means that the "must_see" property works as expected). The same behavior used to work properly on version 1.11.2.1.
     
Impact:
    The behavior meant to be used for new map that involves hiding and relies on using the behavior to detect if player is visible for other entity. If it won't be fixed it will be neccessary to implement a new way of detecting line of sight between two entities (which probably won't be as effective).
Repro Steps:
step 1 - Download must_see_forget_duration_bug behavior pack and create new world with this pack.
step 2 - Summon a bat.
step 3 - Build a wall between you and the bat. Preferably glass wall in order to see the results easier.
step 4 - Change gamemode to adventure and reveal yourself to the bat. Attatched behaviorpack changes scale of the bat to 2.0 when it has a target and changes it back to 1.0 when the target is lost.
Observed Results:
    On version 1.12.0.25 the bat can't lose its target (it remains in 2.0 scale).
Expected Results:
    Version 1.12.0.25 should have the same behavior as 1.11. The bat should change back to normal scale when it cannot see the player
Screenshots/Videos attached: Yes
Regression Builds:
1.11.2.1.

Fixed

Bram Wulteputte

2019-07-02, 03:13 PM

2019-07-18, 07:45 PM

2019-07-18, 07:45 PM

0

0

-

-