WitchReadyPotionEvent
Control what potion the witch readies to use
This commit is contained in:
24
Spigot-Server-Patches/WitchReadyPotionEvent.patch
Normal file
24
Spigot-Server-Patches/WitchReadyPotionEvent.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
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 bf029ad1c..035aa4a90 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
||||
@@ -0,0 +0,0 @@ public class EntityWitch extends EntityMonster 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.bx = this.getItemInMainHand().m();
|
||||
this.a(true);
|
||||
this.world.a((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.iz, this.bK(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
--
|
||||
Reference in New Issue
Block a user