aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0259-WitchReadyPotionEvent.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0259-WitchReadyPotionEvent.patch')
-rw-r--r--Spigot-Server-Patches/0259-WitchReadyPotionEvent.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0259-WitchReadyPotionEvent.patch b/Spigot-Server-Patches/0259-WitchReadyPotionEvent.patch
new file mode 100644
index 0000000000..a568a32ad8
--- /dev/null
+++ b/Spigot-Server-Patches/0259-WitchReadyPotionEvent.patch
@@ -0,0 +1,26 @@
+From d2c614b2a47fdc650f7d86e1f79969022c48d1eb Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Tue, 5 Jun 2018 22:47:26 -0400
+Subject: [PATCH] WitchReadyPotionEvent
+
+
+diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java
+index 62f99fc3b7..feedfc9d9c 100644
+--- a/src/main/java/net/minecraft/server/EntityWitch.java
++++ b/src/main/java/net/minecraft/server/EntityWitch.java
+@@ -100,7 +100,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
+ }
+
+ if (potionregistry != null) {
+- this.setSlot(EnumItemSlot.MAINHAND, PotionUtil.a(new ItemStack(Items.POTION), potionregistry));
++ // Paper start
++ ItemStack potion = PotionUtil.a(new ItemStack(Items.POTION), potionregistry);
++ org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion));
++ this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack));
++ // Paper end
+ this.bC = this.getItemInMainHand().k();
+ this.a(true);
+ this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_WITCH_DRINK, this.bV(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
+--
+2.21.0
+