
Finished the spell blocks enough to allow further expansion. Need to work on textures, as well as the orientation mechanics of the blocks. Also need to look at Vazkii's block renderer to verify a few feature additions.
57 lines
1.1 KiB
Java
57 lines
1.1 KiB
Java
package WayofTime.alchemicalWizardry.common.tileEntity;
|
|
|
|
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
|
|
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement;
|
|
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancementCost;
|
|
|
|
public class TESpellEnhancementBlock extends TESpellBlock
|
|
{
|
|
@Override
|
|
protected void applySpellChange(SpellParadigm parad)
|
|
{
|
|
int i = -1;
|
|
|
|
switch(this.enhancementType())
|
|
{
|
|
case 0:
|
|
i = parad.getBufferedEffectPower();
|
|
break;
|
|
case 1:
|
|
i = parad.getBufferedEffectCost();
|
|
break;
|
|
case 2:
|
|
i = parad.getBufferedEffectPotency();
|
|
break;
|
|
}
|
|
|
|
if(i!=-1 && i<this.getLimit())
|
|
{
|
|
parad.applyEnhancement(getSpellEnhancement());
|
|
}
|
|
else if(i<this.getLimit())
|
|
{
|
|
this.doBadStuff();
|
|
}
|
|
}
|
|
|
|
public SpellEnhancement getSpellEnhancement()
|
|
{
|
|
return new SpellEnhancementCost();
|
|
}
|
|
|
|
public int getLimit()
|
|
{
|
|
return 5;
|
|
}
|
|
|
|
public int enhancementType() //0 is power, 1 is cost, 2 is potency
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
public void doBadStuff()
|
|
{
|
|
|
|
}
|
|
}
|