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

17 lines
923 B
Diff
Raw Normal View History

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