SPIGOT-5208: Reset state on cancelled EntityTransformEvent to prevent event spam

This commit is contained in:
md_5
2019-07-26 09:58:18 +10:00
parent f744c09c02
commit c88867e4fc
4 changed files with 24 additions and 19 deletions

View File

@@ -1,18 +1,17 @@
--- a/net/minecraft/server/EntityPig.java
+++ b/net/minecraft/server/EntityPig.java
@@ -2,6 +2,11 @@
@@ -2,6 +2,10 @@
import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.event.entity.EntityTransformEvent;
+// CraftBukkit end
+
public class EntityPig extends EntityAnimal {
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityPig.class, DataWatcherRegistry.i);
@@ -163,7 +168,13 @@
@@ -163,7 +167,13 @@
entitypigzombie.setCustomNameVisible(this.getCustomNameVisible());
}