From 6d09acc78e8f110c95aaddbcb736707b656f4097 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Mon, 2 Sep 2019 16:32:03 +0100 Subject: [PATCH] Make combustion rune respect playerBlockDamage and mobGriefing settings, fixes part of #217 --- .../wizardry/entity/construct/EntityCombustionRune.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/electroblob/wizardry/entity/construct/EntityCombustionRune.java b/src/main/java/electroblob/wizardry/entity/construct/EntityCombustionRune.java index f9188d6c..45494990 100644 --- a/src/main/java/electroblob/wizardry/entity/construct/EntityCombustionRune.java +++ b/src/main/java/electroblob/wizardry/entity/construct/EntityCombustionRune.java @@ -1,5 +1,6 @@ package electroblob.wizardry.entity.construct; +import electroblob.wizardry.Wizardry; import electroblob.wizardry.registry.Spells; import electroblob.wizardry.spell.Spell; import electroblob.wizardry.util.WizardryUtilities; @@ -33,7 +34,8 @@ public class EntityCombustionRune extends EntityMagicConstruct { float strength = Spells.combustion_rune.getProperty(Spell.BLAST_RADIUS).floatValue(); - world.newExplosion(this.getCaster(), this.posX, this.posY, this.posZ, strength, true, true); + world.newExplosion(this.getCaster(), this.posX, this.posY, this.posZ, strength, true, + getCaster() != null && WizardryUtilities.canDamageBlocks(getCaster(), world)); // The trap is destroyed once triggered. this.setDead();