2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 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/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
2023-09-22 00:01:00 +02:00
|
|
|
index 40876df2503eed53c5d7769931f8201fb709cf6f..ca24b592273208e61e0e0ba59b7e5a3c11ebf952 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
2023-09-22 00:01:00 +02:00
|
|
|
@@ -160,7 +160,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (potionregistry != null) {
|
|
|
|
- this.setItemSlot(EquipmentSlot.MAINHAND, PotionUtils.setPotion(new ItemStack(Items.POTION), potionregistry));
|
|
|
|
+ // Paper start
|
|
|
|
+ ItemStack potion = PotionUtils.setPotion(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.setItemSlot(EquipmentSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack));
|
|
|
|
+ // Paper end
|
|
|
|
this.usingTime = this.getMainHandItem().getUseDuration();
|
|
|
|
this.setUsingItem(true);
|
|
|
|
if (!this.isSilent()) {
|