mojira.dev
MCPE-230626

query.is_delayed_attacking does not reset and entity becomes stuck when minecraft:behavior.delayed_attack uses hit_delay_pct < 0.45

Summary: When using the “minecraft:behavior.delayed_attack” component with “hit_delay_pct” set below 0.45, the entity performs a lethal hit, then moves toward the position where its target died and remains stuck. The query “query.is_delayed_attacking” stays at 1.0 and never resets to 0.0, preventing the entity from continuing its behavior cycle.

Steps to Reproduce:

  1. Create a behavior pack with a custom entity that includes the following component:

json


			"minecraft:behavior.delayed_attack": {
				"attack_duration": 2,
				"attack_once": false,
				"hit_delay_pct": 0.4,
				"reach_multiplier": 3,
				"track_target": true
			},
  1. Spawn the entity and a target (e.g., player or mob) within attack range.

  2. Allow the entity to perform a delayed attack.

  3. Observe the behavior after the target dies.

Expected Result:

  • The entity should apply damage, complete the attack sequence, and reset query.is_delayed_attacking to 0.0.

  • The entity should resume normal behavior or attack another target.

Actual Result:

  • The entity delivers the lethal hit, then moves toward the target’s death position and remains stuck.

  • “query.is_delayed_attacking” stays at 1.0 indefinitely.

  • The entity does not resume movement, attack, or other behaviors.

Linked issues

Attachments

Comments 0

No comments.

N505

(Unassigned)

1509601

Confirmed

Windows

10

1.21.120

Retrieved