diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch new file mode 100644 index 0000000000..ed04ec54ac --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch @@ -0,0 +1,27 @@ +--- a/net/minecraft/world/entity/monster/Ravager.java ++++ b/net/minecraft/world/entity/monster/Ravager.java +@@ -43,6 +43,10 @@ + import net.minecraft.world.phys.Vec3; + import org.joml.Vector3f; + ++// CraftBukkit start ++import org.bukkit.craftbukkit.event.CraftEventFactory; ++// CraftBukkit end ++ + public class Ravager extends Raider { + + private static final Predicate<Entity> NO_RAVAGER_AND_ALIVE = (entity) -> { +@@ -161,7 +157,12 @@ + Block block = blockstate.getBlock(); + + if (block instanceof LeavesBlock) { +- flag = this.level().destroyBlock(blockpos, true, this) || flag; ++ // 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; + } + } + |