geforkt von Mirrors/Paper
19 Zeilen
921 B
Diff
19 Zeilen
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
|
||
|
}
|