PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/PowderSnowBlock.patch

17 lines
886 B
Diff
Raw Normal View History

--- a/net/minecraft/world/level/block/PowderSnowBlock.java
+++ b/net/minecraft/world/level/block/PowderSnowBlock.java
@@ -68,7 +68,12 @@
entity.o(true);
if (!world.isClientSide) {
- if (entity.isBurning() && (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman) && entity.a(world, blockposition)) {
+ // CraftBukkit start
+ if (entity.isBurning() && entity.a(world, blockposition)) {
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !(world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman)).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.b(blockposition, false);
}