0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-22 10:06:16 +00:00
craftbukkit/nms-patches/net/minecraft/world/level/block/PowderSnowBlock.patch
2024-10-23 02:15:00 +11:00

17 lines
968 B
Diff

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