3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00

SPIGOT-5291: Missing event for ravagers trampling crops

Dieser Commit ist enthalten in:
md_5 2019-08-28 20:03:43 +10:00
Ursprung cbdd713908
Commit e91fd75e19

Datei anzeigen

@ -27,3 +27,12 @@
} }
protected int a(World world) { protected int a(World world) {
@@ -125,7 +127,7 @@
@Override
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
- if (entity instanceof EntityRavager && world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit
world.b(blockposition, true);
}