Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
e38eceb42a
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 Spigot Changes: a19903d2 SPIGOT-520: Add option to disable player data saving
24 Zeilen
1.4 KiB
Diff
24 Zeilen
1.4 KiB
Diff
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/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java
|
|
index 58949acbcb69649366df16a0d55e822a039e4d9a..0703124e5137ff0a5ae4d025488eb343d2813067 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
|
@@ -118,7 +118,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.bq = this.getItemInMainHand().k();
|
|
this.v(true);
|
|
if (!this.isSilent()) {
|