Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
e4d10a6d67
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
28 Zeilen
1.4 KiB
Diff
28 Zeilen
1.4 KiB
Diff
From abc9903c5d3cffce9396db4bd310053acd65fcb8 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 ddff0b5786..aa90111716 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
|
@@ -88,7 +88,11 @@ public class EntityWitch extends EntityRaider implements IRangedEntity {
|
|
|
|
this.setSlot(EnumItemSlot.MAINHAND, ItemStack.a);
|
|
if (itemstack.getItem() == Items.POTION) {
|
|
- List<MobEffect> 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<MobEffect> list = event.callEvent() ? PotionUtil.getEffects(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion())) : null;
|
|
+ // Paper end
|
|
|
|
if (list != null) {
|
|
Iterator iterator = list.iterator();
|
|
--
|
|
2.25.1
|
|
|