#1209: Clean up various patches
By: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
--- 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);
|
||||
@@ -41,6 +41,10 @@
|
||||
import net.minecraft.world.phys.AxisAlignedBB;
|
||||
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) -> {
|
||||
@@ -171,6 +175,11 @@
|
||||
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
|
||||
if (block instanceof BlockLeaves) {
|
||||
+ // 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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user