mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Don't fire EntityZapEvent twice (#6830)
This commit is contained in:
parent
58e4f8acf4
commit
399444abda
1 changed files with 0 additions and 16 deletions
|
@ -4,22 +4,6 @@ Date: Sun, 16 Oct 2016 23:19:30 -0700
|
|||
Subject: [PATCH] Add EntityZapEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Pig.java b/src/main/java/net/minecraft/world/entity/animal/Pig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Pig.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Pig.java
|
||||
@@ -0,0 +0,0 @@ public class Pig extends Animal implements ItemSteerable, Saddleable {
|
||||
}
|
||||
|
||||
entitypigzombie.setPersistenceRequired();
|
||||
+ // Paper start
|
||||
+ if (CraftEventFactory.callEntityZapEvent(this, lightning, entitypigzombie).isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
// CraftBukkit start
|
||||
if (CraftEventFactory.callPigZapEvent(this, lightning, entitypigzombie).isCancelled()) {
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
|
|
Loading…
Reference in a new issue