Move CraftBukkit per-file patches
By: Initial <noreply+automated@papermc.io>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
--- a/net/minecraft/world/food/FoodInfo.java
|
||||
+++ b/net/minecraft/world/food/FoodInfo.java
|
||||
@@ -18,6 +18,10 @@
|
||||
import net.minecraft.world.item.component.ConsumableListener;
|
||||
import net.minecraft.world.level.World;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public record FoodInfo(int nutrition, float saturation, boolean canAlwaysEat) implements ConsumableListener {
|
||||
|
||||
public static final Codec<FoodInfo> DIRECT_CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
@@ -31,7 +35,7 @@
|
||||
|
||||
world.playSound((EntityHuman) null, entityliving.getX(), entityliving.getY(), entityliving.getZ(), (SoundEffect) consumable.sound().value(), SoundCategory.NEUTRAL, 1.0F, randomsource.triangle(1.0F, 0.4F));
|
||||
if (entityliving instanceof EntityHuman entityhuman) {
|
||||
- entityhuman.getFoodData().eat(this);
|
||||
+ entityhuman.getFoodData().eat(this, itemstack, (EntityPlayer) entityhuman); // CraftBukkit
|
||||
world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, MathHelper.randomBetween(randomsource, 0.9F, 1.0F));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user