Repository navigation
Conversation
|
In your PRs, please keep the diff minimal. Also pay attention to code quality & clarity. Overall just avoid useless shit that AI adds that a human wouldn't. |
Replace CraftBukkit ticksLived % 2 gate with MinecraftServer.currentTick so all non-players share one intentional half-rate schedule. Players still never skip. Inline the check in EntityLiving (no one-use helper class). Co-authored-by: xii69 <xii69@yahoo.com>
f702003 to
0d6e236
Compare
Co-authored-by: xii69 <xii69@yahoo.com>
0d6e236 to
617100b
Compare
…edule Correct "Fix EntityLiving every-other-tick collision skip schedule"
|
Isn't it better to base it on That way there's a bit of randomness. With the change you're proposing, every collision would run on the same ticks instead of being spread out |
True, would likely be better - especially to keep the Vanilla behavior. |
What was wrong
Non-player living entities still skip pushing each other every other tick (old CraftBukkit perf). The gate used
ticksLived % 2, which is tied to when the mob spawned. Two mobs can both skip or both push on the same tick, and it drifts under activation-range ticking. The TODO literally asked if we had a better check now.What this changes
Keep the half-rate skip (intentional on this fork — we’re not doing full SPIGOT-1994 removal), but schedule it on
MinecraftServer.currentTickso all non-players share one clock. Players never skip.Why this is needed
Spawn-parity skipping makes mob-mob collision uneven and harder to reason about with EAR. A global tick schedule keeps the optimization without the weird pairing.
Testing
LivingEntityCollisionSkipTest5/5; server suite green; package OK.