PaperMC/paper-server/nms-patches/net/minecraft/world/entity/monster/EntityRavager.patch

12 lines
726 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/world/entity/monster/EntityRavager.java
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
@@ -170,7 +170,7 @@
IBlockData iblockdata = this.level.getBlockState(blockposition);
Block block = iblockdata.getBlock();
- if (block instanceof BlockLeaves) {
+ 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;
}
}