2021-03-16 09:00:00 +11:00
|
|
|
--- a/net/minecraft/world/entity/monster/EntityRavager.java
|
|
|
|
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -43,6 +43,10 @@
|
2024-04-24 01:15:00 +10:00
|
|
|
import net.minecraft.world.phys.AxisAlignedBB;
|
2023-06-24 17:15:05 +10:00
|
|
|
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) -> {
|
2024-06-14 01:05:00 +10:00
|
|
|
@@ -147,6 +151,11 @@
|
2019-04-29 18:11:13 +10:00
|
|
|
Block block = iblockdata.getBlock();
|
|
|
|
|
2023-06-24 17:15:05 +10:00
|
|
|
if (block instanceof BlockLeaves) {
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2023-06-08 01:30:00 +10:00
|
|
|
flag = this.level().destroyBlock(blockposition, true, this) || flag;
|
2019-04-29 18:11:13 +10:00
|
|
|
}
|
|
|
|
}
|