Added interfaces for custom Spell Paradigms.
This commit is contained in:
parent
8e1c8460be
commit
bc50e92fa3
|
@ -0,0 +1,10 @@
|
||||||
|
package WayofTime.alchemicalWizardry.api.tile;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public interface ISpellParadigmTile extends ISpellTile
|
||||||
|
{
|
||||||
|
public void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack);
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package WayofTime.alchemicalWizardry.api.tile;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||||
|
|
||||||
|
public interface ISpellTile
|
||||||
|
{
|
||||||
|
public void modifySpellParadigm(SpellParadigm parad);
|
||||||
|
|
||||||
|
public boolean canInputRecieveOutput(ForgeDirection output);
|
||||||
|
}
|
|
@ -1,11 +1,13 @@
|
||||||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||||
|
|
||||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||||
|
import WayofTime.alchemicalWizardry.api.tile.ISpellTile;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public abstract class TESpellBlock extends TEOrientable
|
public abstract class TESpellBlock extends TEOrientable implements ISpellTile
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
public void modifySpellParadigm(SpellParadigm parad)
|
public void modifySpellParadigm(SpellParadigm parad)
|
||||||
{
|
{
|
||||||
this.applySpellChange(parad);
|
this.applySpellChange(parad);
|
||||||
|
@ -41,6 +43,7 @@ public abstract class TESpellBlock extends TEOrientable
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean canInputRecieveOutput(ForgeDirection output)
|
public boolean canInputRecieveOutput(ForgeDirection output)
|
||||||
{
|
{
|
||||||
return this.canInputRecieve() && this.getInputDirection().getOpposite() == output;
|
return this.canInputRecieve() && this.getInputDirection().getOpposite() == output;
|
||||||
|
|
|
@ -9,8 +9,9 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee;
|
||||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile;
|
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile;
|
||||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf;
|
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf;
|
||||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmTool;
|
||||||
|
import WayofTime.alchemicalWizardry.api.tile.ISpellParadigmTile;
|
||||||
|
|
||||||
public class TESpellParadigmBlock extends TESpellBlock
|
public class TESpellParadigmBlock extends TESpellBlock implements ISpellParadigmTile
|
||||||
{
|
{
|
||||||
public SpellParadigm getSpellParadigm()
|
public SpellParadigm getSpellParadigm()
|
||||||
{
|
{
|
||||||
|
@ -40,6 +41,7 @@ public class TESpellParadigmBlock extends TESpellBlock
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack)
|
public void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack)
|
||||||
{
|
{
|
||||||
SpellParadigm parad = this.getSpellParadigm();
|
SpellParadigm parad = this.getSpellParadigm();
|
||||||
|
|
Loading…
Reference in a new issue