fix: edge case in AiTickThrottler legacycleanup and added exclusion support#17
Open
Xytronix wants to merge 10 commits intoIroriPowered:masterfrom
Open
fix: edge case in AiTickThrottler legacycleanup and added exclusion support#17Xytronix wants to merge 10 commits intoIroriPowered:masterfrom
Xytronix wants to merge 10 commits intoIroriPowered:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Separates cleanup and legacy cleanup and adds optiona exclusion support for specific, mountable and flying NPCs to the AITickThrottler.
The old cleanup system entangled normal cleanup and legacy cleanup in a single if/else branch gated behind
CleanupFrozenEntities. This caused an edge case whereLegacyCleanup=truewithCleanupFrozenEntities=truewould skip cleanup on entities that had theTickThrottledmarker.Related issues
User reported issues with NPCs not cleaning up
[2026/03/03 18:22:48 SEVERE] [SpawnMarkerBlockStateSystems] Creating new spawn marker due to desync with entity: Ref{store=class com.hypixel.hytale.component.Store@1440655386, index=58} [2026/03/03 18:22:48 SEVERE] [SpawnMarkerBlockStateSystems] Creating new spawn marker due to desync with entity: Ref{store=class com.hypixel.hytale.component.Store@1440655386, index=275}Type of change
Implementation details
AiTickThrottlerCleanupSystem— Cleanup and legacy cleanup are now two independent sequential code paths instead of an if/else:CleanupFrozenEntities=trueand entity hasTickThrottledmarker → removes all 3 components, then returns earlyLegacyCleanup=trueand entity has orphanedFrozen/StepComponentwithoutTickThrottled→ removes those. No longer gated behindCleanupFrozenEntities.Each path has its own independent NPC type exclusion list (
CleanupExcludedNpcTypes,LegacyCleanupExcludedNpcTypes).AiTickThrottlerService— Added exclusion checks using ECS components from the Hytale server:ThrottleExcludedNpcTypes— NPC type IDs viaNPCEntity.getNPCTypeId()ThrottleExcludeMounts(defaultfalse) — skips entities withNPCMountComponentThrottleExcludeFlying(defaultfalse) — skips entities withMovementStatesComponent.getMovementStates().flying == trueChecklist
spotlessApplywhen necessary)