PaperMC/paper-server/patches/sources/net/minecraft/world/food/FoodProperties.java.patch
2024-12-14 12:50:23 -08:00

11 lines
745 B
Diff

--- a/net/minecraft/world/food/FoodProperties.java
+++ b/net/minecraft/world/food/FoodProperties.java
@@ -41,7 +_,7 @@
RandomSource random = entity.getRandom();
level.playSound(null, entity.getX(), entity.getY(), entity.getZ(), consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, random.triangle(1.0F, 0.4F));
if (entity instanceof Player player) {
- player.getFoodData().eat(this);
+ player.getFoodData().eat(this, stack, (net.minecraft.server.level.ServerPlayer) player); // CraftBukkit
level.playSound(
null, player.getX(), player.getY(), player.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, Mth.randomBetween(random, 0.9F, 1.0F)
);