2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/entity/monster/EntityRavager.java
|
|
|
|
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -42,6 +42,10 @@
|
|
|
|
import net.minecraft.world.phys.AxisAlignedBB;
|
2023-06-24 09:15:05 +02: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-04-23 17:15:00 +02:00
|
|
|
@@ -146,6 +150,11 @@
|
2019-04-29 10:11:13 +02:00
|
|
|
Block block = iblockdata.getBlock();
|
|
|
|
|
2023-06-24 09:15:05 +02: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-07 17:30:00 +02:00
|
|
|
flag = this.level().destroyBlock(blockposition, true, this) || flag;
|
2019-04-29 10:11:13 +02:00
|
|
|
}
|
|
|
|
}
|