2018-07-21 21:24:18 +00:00
|
|
|
From 8b9681193930f2c02174ea5fb7e6b1aca5ea07ad Mon Sep 17 00:00:00 2001
|
2018-06-06 02:48:27 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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
|
2018-07-21 21:24:18 +00:00
|
|
|
index 2d8e307e7..b6f4ec842 100644
|
2018-06-06 02:48:27 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
2018-07-18 23:16:19 +00:00
|
|
|
@@ -100,7 +100,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
2018-06-06 02:48:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2018-07-18 23:16:19 +00:00
|
|
|
this.bC = this.getItemInMainHand().k();
|
2018-06-06 02:48:27 +00:00
|
|
|
this.a(true);
|
2018-07-18 23:16:19 +00:00
|
|
|
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);
|
2018-06-06 02:48:27 +00:00
|
|
|
--
|
2018-06-30 05:40:52 +00:00
|
|
|
2.18.0
|
2018-06-06 02:48:27 +00:00
|
|
|
|