mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-22 15:56:18 +00:00
27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
|
|
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
|
|
@@ -22,6 +22,11 @@
|
|
import net.minecraft.world.level.chunk.status.ChunkStatus;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.block.CraftBlock;
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
+// CraftBukkit end
|
|
+
|
|
public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
|
|
|
|
private final Block blockToRemove;
|
|
@@ -97,6 +102,11 @@
|
|
}
|
|
|
|
if (this.ticksSinceReachedGoal > 60) {
|
|
+ // CraftBukkit start - Step on eggs
|
|
+ if (!CraftEventFactory.callEntityInteractEvent(this.removerMob, CraftBlock.at(world, blockposition1))) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
world.removeBlock(blockposition1, false);
|
|
if (!world.isClientSide) {
|
|
for (int i = 0; i < 20; ++i) {
|