craftbukkit/nms-patches/net/minecraft/world/entity/monster/EntityRavager.patch

12 lines
726 B
Diff
Raw Normal View History

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/world/entity/monster/EntityRavager.java
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
2023-03-15 03:30:00 +11:00
@@ -170,7 +170,7 @@
2021-11-22 09:00:00 +11:00
IBlockData iblockdata = this.level.getBlockState(blockposition);
Block block = iblockdata.getBlock();
- if (block instanceof BlockLeaves) {
2021-11-22 09:00:00 +11:00
+ if (block instanceof BlockLeaves && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit
flag = this.level.destroyBlock(blockposition, true, this) || flag;
}
}