mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 02:22:12 +01:00
30e4583dbe
By: Initial Source <noreply+automated@papermc.io>
19 lines
1 KiB
Diff
19 lines
1 KiB
Diff
--- a/net/minecraft/world/food/FoodProperties.java
|
|
+++ b/net/minecraft/world/food/FoodProperties.java
|
|
@@ -5,6 +5,7 @@
|
|
import net.minecraft.network.RegistryFriendlyByteBuf;
|
|
import net.minecraft.network.codec.ByteBufCodecs;
|
|
import net.minecraft.network.codec.StreamCodec;
|
|
+import net.minecraft.server.level.ServerPlayer;
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.sounds.SoundSource;
|
|
@@ -31,7 +32,7 @@
|
|
|
|
world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), (SoundEvent) consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, randomsource.triangle(1.0F, 0.4F));
|
|
if (user instanceof Player entityhuman) {
|
|
- entityhuman.getFoodData().eat(this);
|
|
+ entityhuman.getFoodData().eat(this, stack, (ServerPlayer) entityhuman); // CraftBukkit
|
|
world.playSound((Player) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, Mth.randomBetween(randomsource, 0.9F, 1.0F));
|
|
}
|
|
|