#`minecraft:behavior.owner_hurt_target`: The target is extremely persistant

1 messages · Page 1 of 1 (latest)

fading jungle
#

Anyone had issues with making an entity deselect a target from minecraft:behavior.owner_hurt_target? I have a custom entity that protects its owner. It uses the minecraft:behavior.owner_hurt_target behavior. Once the owner hits anything, the entity completely focus on that target. It doesn't even reselect the target when the owner hits a new entity and it doesn't forget the target when the it is moved hundreds of blocks away.

Things I tried so far:

  • Providing alternative target via minecraft:behavior.nearest_prioritized_attackable_target. It works until the alternative target is dead. After that the entity returns to targeting the entitty attacked by owner.
  • Removing all existing targeting components from the entity for a moment (longer than 1 tick)
  • Removing attack ability for a moment (longer than 1 tick)
  • Using the entity_types in the minecraft:behavior.owner_hurt_target with reevaluate_description set to true, and making the target invalid by giving it a special /tag excluded in the filters.
  • Using must_see_forget_duration in entity_types mentioned above.

Reloading the game works when the target is far away.

It's also worth mentioning that the wolf behvior lets the wolf forget its target, but I wasn't able to identify the components that enable this behavior.

fading jungle
#

I copied entire wolfs behavior creating a fake_wolf entity. It can forget its target so it must be something in my behavior...