Fix Witch Throw Potion error - Resolves #1129
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] WitchThrowPotionEvent
|
||||
Fired when a witch throws a potion at a player
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java
|
||||
index 3a00a37eb..f51989588 100644
|
||||
index 3a00a37eb..bf029ad1c 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 {
|
||||
@@ -16,7 +16,7 @@ index 3a00a37eb..f51989588 100644
|
||||
- EntityPotion entitypotion = new EntityPotion(this.world, this, PotionUtil.a(new ItemStack(Items.SPLASH_POTION), potionregistry));
|
||||
+ // Paper start
|
||||
+ ItemStack potion = PotionUtil.a(new ItemStack(Items.SPLASH_POTION), potionregistry);
|
||||
+ com.destroystokyo.paper.event.entity.WitchThrowPotionEvent event = new com.destroystokyo.paper.event.entity.WitchThrowPotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), (org.bukkit.entity.Player) entityliving.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion));
|
||||
+ com.destroystokyo.paper.event.entity.WitchThrowPotionEvent event = new com.destroystokyo.paper.event.entity.WitchThrowPotionEvent((org.bukkit.entity.Witch) this.getBukkitEntity(), (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion));
|
||||
+ if (!event.callEvent()) {
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user