diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/monster/Ravager.java.patch new file mode 100644 index 0000000000..052e734c64 --- /dev/null +++ b/patch-remap/mache-vineflower-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 +@@ -41,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 -> entity.isAlive() && !(entity instanceof Ravager); + private static final double BASE_MOVEMENT_SPEED = 0.3; +@@ -149,7 +157,12 @@ + BlockState blockState = this.level().getBlockState(blockPos); + 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; + } + } + |