From f63504952f1b650d364c6dd34e3f39dfe42ee3b1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 21 Nov 2021 11:18:06 +1100 Subject: [PATCH] SPIGOT-6798: EntityChangeBlockEvent called with incorrect location --- .../minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch index e3a040608..5b3f4edba 100644 --- a/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch +++ b/nms-patches/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch @@ -27,7 +27,7 @@ if (this.level.getType(blockposition1).a(Blocks.GRASS_BLOCK)) { - if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { + // CraftBukkit -+ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, Blocks.AIR.getBlockData(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { ++ if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.AIR.getBlockData(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { this.level.triggerEffect(2001, blockposition1, Block.getCombinedId(Blocks.GRASS_BLOCK.getBlockData())); this.level.setTypeAndData(blockposition1, Blocks.DIRT.getBlockData(), 2); }