Skip to content

Restore ActivationRange attackTicks immunity - #202

Merged
windcolor-dev merged 12 commits into
Wind-Development:masterfrom
xii69:fix/activation-range-attack-ticks
Oct 17, 2026
Merged

windcolor-dev merged 12 commits into
Wind-Development:masterfrom
xii69:fix/activation-range-attack-ticks

Conversation

@xii69

@xii69 xii69 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What was wrong

Activation range used to keep entities active during melee attack cooldown via attackTicks. In 1.8 that field went away (cooldown moved into the melee goal), and Spigot left the check commented with “missed mapping?”. Mapping it to at would be wrong — that’s arrow hit timer. Without a real cooldown signal, mobs can deactivate mid-swing window under EAR.

What this changes

Restores an entity-level attackTicks (20 ticks), set from melee attack entry points, decremented like hurt ticks, and re-enables the EAR immunity check. Does not misuse at.

Why this is needed

EAR is a performance feature; it shouldn’t freeze combat timing by putting attackers to sleep during their cooldown. This puts back the immunity the TODO was pointing at, with the correct meaning.

Testing

ActivationRangeAttackTicksTest 5/5; server suite green; package OK.

cursoragent and others added 11 commits October 13, 2026 18:58
Mojang removed pre-1.8 AttackTime in 1.8, so Spigot left the
ActivationRange living.attackTicks > 0 check commented out as a
missed mapping. Restore the field (20-tick melee cooldown), wire it
from melee attack entry points, and re-enable the immunity so mobs
are not deactivated mid-attack cooldown.

Co-authored-by: xii69 <xii69@yahoo.com>
@cursor
cursor Bot force-pushed the fix/activation-range-attack-ticks branch from f10f057 to 18eef7a Compare October 14, 2026 21:11
@windcolor-dev

Copy link
Copy Markdown
Member

This change doesn't really do too much right? We already have this check in there

			if (entity instanceof EntityCreature && ((EntityCreature) entity).getGoalTarget() != null) {
				return true;
			}

@kalibrieren

Copy link
Copy Markdown
Contributor

This change doesn't really do too much right? We already have this check in there

			if (entity instanceof EntityCreature && ((EntityCreature) entity).getGoalTarget() != null) {
				return true;
			}

restoring attackTicks is way different and should be kept

@windcolor-dev

Copy link
Copy Markdown
Member

Yeah you're right, I guess it's better to add it

@windcolor-dev
windcolor-dev merged commit fa7bb3e into Wind-Development:master Oct 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants