Fix fireball mobgriefing override not working (#1726)

This commit is contained in:
Amine KACIMI
2025-11-21 06:49:55 +01:00
committed by GitHub
parent edbd95cddc
commit 95a466cf8e

View File

@@ -201,7 +201,7 @@
case NONE -> Explosion.BlockInteraction.KEEP; case NONE -> Explosion.BlockInteraction.KEEP;
case BLOCK -> this.getDestroyType(GameRules.RULE_BLOCK_EXPLOSION_DROP_DECAY); case BLOCK -> this.getDestroyType(GameRules.RULE_BLOCK_EXPLOSION_DROP_DECAY);
- case MOB -> this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) - case MOB -> this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)
+ case MOB -> (source instanceof net.minecraft.world.entity.projectile.LargeFireball && this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING, this.purpurConfig.fireballsMobGriefingOverride)) || this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) // Purpur - Add mobGriefing override to everything affected + case MOB -> ((source instanceof net.minecraft.world.entity.projectile.LargeFireball) ? this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING, this.purpurConfig.fireballsMobGriefingOverride) : this.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) // Purpur - Add mobGriefing override to everything affected
? this.getDestroyType(GameRules.RULE_MOB_EXPLOSION_DROP_DECAY) ? this.getDestroyType(GameRules.RULE_MOB_EXPLOSION_DROP_DECAY)
: Explosion.BlockInteraction.KEEP; : Explosion.BlockInteraction.KEEP;
case TNT -> this.getDestroyType(GameRules.RULE_TNT_EXPLOSION_DROP_DECAY); case TNT -> this.getDestroyType(GameRules.RULE_TNT_EXPLOSION_DROP_DECAY);