mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
deb7197a64
By: Doc <nachito94@msn.com>
18 lines
921 B
Diff
18 lines
921 B
Diff
--- a/net/minecraft/world/item/ItemSuspiciousStew.java
|
|
+++ b/net/minecraft/world/item/ItemSuspiciousStew.java
|
|
@@ -53,4 +53,15 @@
|
|
|
|
return super.finishUsingItem(itemstack, world, entityliving);
|
|
}
|
|
+
|
|
+ // CraftBukkit start
|
|
+ public void cancelUsingItem(net.minecraft.server.level.EntityPlayer entityplayer, ItemStack itemstack) {
|
|
+ SuspiciousStewEffects suspicioussteweffects = (SuspiciousStewEffects) itemstack.getOrDefault(DataComponents.SUSPICIOUS_STEW_EFFECTS, SuspiciousStewEffects.EMPTY);
|
|
+
|
|
+ for (SuspiciousStewEffects.a suspicioussteweffects_a : suspicioussteweffects.effects()) {
|
|
+ entityplayer.connection.send(new net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect(entityplayer.getId(), suspicioussteweffects_a.effect()));
|
|
+ }
|
|
+ entityplayer.server.getPlayerList().sendActivePlayerEffects(entityplayer);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|