summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-11-12 19:19:04 +1100
committermd_5 <git@md-5.net>2018-11-12 19:19:04 +1100
commit17ff1e04679d5826f7d574fecc1a97820d5579d1 (patch)
tree5990922a0c85c7cd3fb9d8e7b43448dd912abfd6 /nms-patches
parent3a9118280cba89f5bf5b14f1709993f6df609f5d (diff)
downloadcraftbukkit-17ff1e04679d5826f7d574fecc1a97820d5579d1.tar
craftbukkit-17ff1e04679d5826f7d574fecc1a97820d5579d1.tar.gz
craftbukkit-17ff1e04679d5826f7d574fecc1a97820d5579d1.tar.lz
craftbukkit-17ff1e04679d5826f7d574fecc1a97820d5579d1.tar.xz
craftbukkit-17ff1e04679d5826f7d574fecc1a97820d5579d1.zip
SPIGOT-4483: Missing EntityInteractEvent call for zombies on eggs
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/PathfinderGoalRemoveBlock.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/nms-patches/PathfinderGoalRemoveBlock.patch b/nms-patches/PathfinderGoalRemoveBlock.patch
new file mode 100644
index 00000000..b97b1742
--- /dev/null
+++ b/nms-patches/PathfinderGoalRemoveBlock.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/server/PathfinderGoalRemoveBlock.java
++++ b/net/minecraft/server/PathfinderGoalRemoveBlock.java
+@@ -2,6 +2,10 @@
+
+ import java.util.Random;
+ import javax.annotation.Nullable;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.entity.EntityInteractEvent;
++// CraftBukkit end
+
+ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
+
+@@ -66,6 +70,14 @@
+ }
+
+ if (this.h > 60) {
++ // CraftBukkit start - Step on eggs
++ EntityInteractEvent event = new EntityInteractEvent(this.g.getBukkitEntity(), CraftBlock.at(world, blockposition1));
++ world.getServer().getPluginManager().callEvent((EntityInteractEvent) event);
++
++ if (event.isCancelled()) {
++ return;
++ }
++ // CraftBukkit end
+ world.setAir(blockposition1);
+ if (!world.isClientSide) {
+ for (int i = 0; i < 20; ++i) {