mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-18 03:15:08 +00:00
Added interfaces for custom Spell Paradigms.
This commit is contained in:
1 parent
8e1c8460be
commit
bc50e92fa3
4 files changed
+28
-2
No files matched your search
@@ -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;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.api.tile.ISpellTile;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
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)
|
||||
{
|
||||
this.applySpellChange(parad);
|
||||
@@ -41,6 +43,7 @@ public abstract class TESpellBlock extends TEOrientable
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInputRecieveOutput(ForgeDirection output)
|
||||
{
|
||||
return this.canInputRecieve() && this.getInputDirection().getOpposite() == output;
|
||||
|
||||
+3
-1
@@ -9,8 +9,9 @@ import WayofTime.alchemicalWizardry.api.spell.SpellParadigmMelee;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmProjectile;
|
||||
import WayofTime.alchemicalWizardry.api.spell.SpellParadigmSelf;
|
||||
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()
|
||||
{
|
||||
@@ -40,6 +41,7 @@ public class TESpellParadigmBlock extends TESpellBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void castSpell(World world, EntityPlayer entity, ItemStack spellCasterStack)
|
||||
{
|
||||
SpellParadigm parad = this.getSpellParadigm();
|
||||
|
||||
Reference in new issue
Block a user