2018-11-12 09:19:04 +01:00
|
|
|
--- 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 {
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -81,6 +85,14 @@
|
2018-11-12 09:19:04 +01:00
|
|
|
}
|
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
if (this.i > 60) {
|
2018-11-12 09:19:04 +01:00
|
|
|
+ // CraftBukkit start - Step on eggs
|
2018-12-06 00:00:00 +01:00
|
|
|
+ EntityInteractEvent event = new EntityInteractEvent(this.entity.getBukkitEntity(), CraftBlock.at(world, blockposition1));
|
2018-11-12 09:19:04 +01:00
|
|
|
+ world.getServer().getPluginManager().callEvent((EntityInteractEvent) event);
|
|
|
|
+
|
|
|
|
+ if (event.isCancelled()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2019-04-23 04:00:00 +02:00
|
|
|
world.a(blockposition1, false);
|
2018-11-12 09:19:04 +01:00
|
|
|
if (!world.isClientSide) {
|
|
|
|
for (int i = 0; i < 20; ++i) {
|