mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
27 lines
1.5 KiB
Diff
27 lines
1.5 KiB
Diff
From 2c5d73a131d2a48f82a80f43c33b307c826138e0 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index b9307d380a..ae9efb72c1 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
|
@@ -121,7 +121,11 @@ public class EntityWitch extends EntityRaider 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.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);
|
|
--
|
|
2.21.0
|
|
|