Tick blocks before entities, as ServerLevel.tick does

The scheduled and random block ticks now run after the player's digging
and before any entity, so items a dispenser shoots or a block pops get
their first tick on the tick they appear, as vanilla's do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-12 17:36:33 +02:00
parent 8f80f8decf
commit 4b776a45d8
+9 -3
View File
@@ -2730,6 +2730,15 @@ impl Game<'_> {
self.tick_burning();
self.tick_using();
self.tick_hud();
// The player's digging comes in with its packets, before the level
// ticks; ServerLevel.tick then runs the scheduled and random block
// ticks before any entity, so what they drop or spawn (dispensed
// items, popped crops) moves on the tick it appears, as in vanilla.
self.tick_mining()?;
self.postprocess_chunks()?;
if running {
self.tick_blocks()?;
}
if running {
self.tick_paintings();
self.tick_item_frames();
@@ -2744,7 +2753,6 @@ impl Game<'_> {
self.tick_tridents();
self.tick_rockets();
}
self.tick_mining()?;
if running {
self.tick_items();
}
@@ -2761,9 +2769,7 @@ impl Game<'_> {
if running {
self.tick_end()?;
}
self.postprocess_chunks()?;
if running {
self.tick_blocks()?;
self.tick_falling()?;
self.tick_tnt()?;
}