Remote eating: the sound plays for items without consume particles too
Consumable.emitParticlesAndSounds gates only the particles on hasConsumeParticles; the sound always plays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4810,9 +4810,10 @@ impl Game<'_> {
|
||||
// countdown goes on past zero (LivingEntity.updateUsingItem completes
|
||||
// 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) {
|
||||
// `emit_consume` spawns the bites and plays the eat sound, as
|
||||
// `tick_used_item` does on the player's own server.
|
||||
if consumable.should_emit(remaining) {
|
||||
// `emit_consume` plays the eat sound and spawns the bites (when the
|
||||
// item has consume particles), as `tick_used_item` does on the
|
||||
// player's own server.
|
||||
self.emit_consume(&consumable, &stack, 5);
|
||||
}
|
||||
self.using = Some((slot, ticks + 1));
|
||||
|
||||
Reference in New Issue
Block a user