PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/PowderSnowBlock.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

16 lines
936 B
Diff

--- a/net/minecraft/world/level/block/PowderSnowBlock.java
+++ b/net/minecraft/world/level/block/PowderSnowBlock.java
@@ -69,7 +69,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)).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.destroyBlock(blockposition, false);
}