Play the player's own bites while eating on a remote server

On a remote (non-Horizon) server the use-item tick spawned the crumb
particles but never played the consumable's eat sound, so only the burp
at the end was heard. Call emit_consume for the periodic emit, as
tick_used_item does on the player's own server, so the bites sound too.

Fixes #2747.

Co-Authored-By: Devin (SWE-2 High) <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
socksprox
2026-10-27 15:14:34 +01:00
parent 9e6cd2ed70
commit b98633b677
+3 -1
View File
@@ -4811,7 +4811,9 @@ impl Game<'_> {
// only on the server) until the server's USE_ITEM_COMPLETE.
let remaining = consumable.ticks() - ticks as i32;
if consumable.particles && consumable.should_emit(remaining) {
self.eat_particles(&stack, 5);
// `emit_consume` spawns the bites and plays the eat sound, as
// `tick_used_item` does on the player's own server.
self.emit_consume(&consumable, &stack, 5);
}
self.using = Some((slot, ticks + 1));
}