Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 13:00:06 +01:00
4104545b11
"It was from a different time before books were as jank as they are now. As time has gone on they've only proven to be worse and worse."
24 Zeilen
1.5 KiB
Diff
24 Zeilen
1.5 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/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
|
index e2762c6c37975eb2da59d408998a5c0368c146d1..5e2e8cb5eba4ba36065f07abed954b2aad022321 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java
|
|
@@ -157,7 +157,11 @@ public class Witch extends Raider implements RangedAttackMob {
|
|
}
|
|
|
|
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()) {
|