Finished self-spells for Fire

This commit is contained in:
WayofTime 2014-01-19 16:15:10 -05:00
parent 091bb3db3f
commit 4f0b6199f6
7 changed files with 153 additions and 15 deletions

View file

@ -1,7 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.SelfSpellEffect;
public class SelfEnvironmentalFire extends SelfSpellEffect
@ -17,5 +19,38 @@ public class SelfEnvironmentalFire extends SelfSpellEffect
int posX = (int) Math.round(player.posX - 0.5f);
int posY = (int) player.posY;
int posZ = (int) Math.round(player.posZ - 0.5f);
int powRadius = this.powerUpgrades;
int potRadius = this.potencyUpgrades-1;
for(int i=-powRadius;i<=powRadius;i++)
{
for(int j=-powRadius;j<=powRadius;j++)
{
for(int k=-powRadius;k<=powRadius;k++)
{
if(world.isAirBlock(posX+i, posY+j, posZ+k))
{
world.setBlock(posX+i, posY+j, posZ+k, Block.fire.blockID);
}
}
}
}
for(int i=-potRadius;i<=potRadius;i++)
{
for(int j=-potRadius;j<=potRadius;j++)
{
for(int k=-potRadius;k<=potRadius;k++)
{
if(!world.isAirBlock(posX+i, posY+j, posZ+k))
{
SpellHelper.smeltBlockInWorld(world, posX+i, posY+j, posZ+k);
}
}
}
}
}
}