mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
25 lines
1 KiB
Diff
25 lines
1 KiB
Diff
--- a/net/minecraft/world/entity/monster/EntityRavager.java
|
|
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
|
|
@@ -42,6 +42,10 @@
|
|
import net.minecraft.world.phys.AxisAlignedBB;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
+// CraftBukkit end
|
|
+
|
|
public class EntityRavager extends EntityRaider {
|
|
|
|
private static final Predicate<Entity> NO_RAVAGER_AND_ALIVE = (entity) -> {
|
|
@@ -146,6 +150,11 @@
|
|
Block block = iblockdata.getBlock();
|
|
|
|
if (block instanceof BlockLeaves) {
|
|
+ // CraftBukkit start
|
|
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
|
|
+ continue;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
flag = this.level().destroyBlock(blockposition, true, this) || flag;
|
|
}
|
|
}
|