Mojira Archive
MCM-180

[BLOCKING] must_see in behavior.nearest_attackable_target is unreliable

Verification Builds: 736676

Summary: If a valid target comes in and out of view of the entity targeting it in a short amount of time, it will become that entities target but it will stay its target, even when it goes out of view and reselect_targets is true. If the valid target stays in view longer, it gets un-targed once it goes out of view (for example, behind some blocks.

Impact: This renders must_see useless in situations where the target staying in view for some time is not guaranteed.

Repro Steps:
1. Create a behavior file with a nearest_attackable_target component and the player as the entity type to be targeted.
2. Summon the entity and place some blocks such that when the player is behind them they are out of view of the entity.
3. Change gamemode to survival or adventure so you are a valid target, and stand in the open to get targeted by the entity.
4. Hide behind the blocks, so you are no longer target.
5. Quickly move into view and back out. This may take a few tries to get to work (or break in this case.)

Observed Results: When opening the world in an external tool, the entity is still targeting the player.

Expected Results: The entity has no target, as the player is out of view.

Screenshots/Videos attached: Yes, a video and an example enderman.json I can reproduce the issue with.

Notes: In the video, I use on_target_acquired and on_target_lost to visualize whether or not the enderman has a target by changing its hitbox. When the hitbox is tall, the enderman is targeting something. As you can see, when I quickly move into and out of view the hitbox does not become short as it should when the enderman loses its target. The bug is not with either of those components, I have verified by opening the world in MCCToolChest PE.

Awaiting Response

BluCode

2018-03-16, 09:21 PM

2018-10-04, 01:30 AM

2018-10-04, 01:30 AM

2

2

Future Release

-