PaperMC/paper-server/nms-patches/net/minecraft/world/item/ItemSuspiciousStew.patch
2024-09-07 19:35:16 +10:00

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
}