mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
05466e3b47
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
28 lines
1.4 KiB
Diff
28 lines
1.4 KiB
Diff
From cd75b8fd7c9934a2be702d44325832c739fa7247 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Wed, 16 May 2018 20:35:16 -0400
|
|
Subject: [PATCH] WitchConsumePotionEvent
|
|
|
|
Fires when a witch consumes the potion in their hand
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java
|
|
index b397636247..790ab11c17 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
|
@@ -67,7 +67,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
|
|
|
this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a);
|
|
if (itemstack.getItem() == Items.POTION) {
|
|
- List list = PotionUtil.getEffects(itemstack);
|
|
+ // Paper start
|
|
+ com.destroystokyo.paper.event.entity.WitchConsumePotionEvent event = new com.destroystokyo.paper.event.entity.WitchConsumePotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack));
|
|
+
|
|
+ List list = event.callEvent() ? PotionUtil.getEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null;
|
|
+ // Paper end
|
|
|
|
if (list != null) {
|
|
Iterator iterator = list.iterator();
|
|
--
|
|
2.18.0
|
|
|