2019-07-17 00:09:32 +02:00
|
|
|
From ae421885ee7a0da3bd1423a3f077abbcf915ecb9 Mon Sep 17 00:00:00 2001
|
2018-06-06 04:48:27 +02: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
|
2019-07-17 00:09:32 +02:00
|
|
|
index 0c641d915..d383b0ab4 100644
|
2018-06-06 04:48:27 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
2019-04-29 05:14:31 +02:00
|
|
|
@@ -121,7 +121,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity {
|
2018-06-06 04:48:27 +02: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
|
2019-04-29 05:14:31 +02:00
|
|
|
this.bB = this.getItemInMainHand().k();
|
|
|
|
this.s(true);
|
|
|
|
this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
2018-06-06 04:48:27 +02:00
|
|
|
--
|
2019-06-25 21:18:50 +02:00
|
|
|
2.22.0
|
2018-06-06 04:48:27 +02:00
|
|
|
|