Block protection compat overhaul
- Unifies all block protection checks into helper methods in BlockUtils which trigger all the necessary forge events and vanilla methods - Implements these checks in all the appropriate places and removes calls to EntityUtils#canDamageBlocks(...) where they are no longer needed - Changes the mine spell to respect the config settings in line with the rest of the spells - Fixes earthquake not respecting the settings at all - Adds a separate config option for dispenser block damage and updates the description for the existing settings to reflect the changes
This commit is contained in:
@@ -51,8 +51,8 @@ public class EntityLargeMagicFireball extends EntityMagicFireball {
|
||||
protected void onImpact(RayTraceResult rayTrace){
|
||||
|
||||
if(!world.isRemote){
|
||||
boolean flag = this.getThrower() == null || EntityUtils.canDamageBlocks(this.getThrower(), world);
|
||||
this.world.newExplosion(null, this.posX, this.posY, this.posZ, getExplosionPower() * blastMultiplier, flag, flag);
|
||||
boolean terrainDamage = EntityUtils.canDamageBlocks(this.getThrower(), world);
|
||||
this.world.newExplosion(null, this.posX, this.posY, this.posZ, getExplosionPower() * blastMultiplier, terrainDamage, terrainDamage);
|
||||
}
|
||||
|
||||
super.onImpact(rayTrace);
|
||||
|
||||
Reference in New Issue
Block a user