Joshie comment!

This commit is contained in:
WayofTime 2014-06-02 15:16:36 -04:00
parent 1c0deadfc6
commit ac943e9d38
753 changed files with 8715 additions and 1184 deletions

View file

@ -1,48 +0,0 @@
package WayofTime.alchemicalWizardry.common.tileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
public abstract class TESpellBlock extends TEOrientable
{
public void modifySpellParadigm(SpellParadigm parad)
{
this.applySpellChange(parad);
TileEntity tile = this.getTileAtOutput();
if(tile instanceof TESpellBlock)
{
TESpellBlock outputBlock = (TESpellBlock)tile;
outputBlock.modifySpellParadigm(parad);
}
}
protected abstract void applySpellChange(SpellParadigm parad);
public TESpellBlock getTileAtOutput()
{
ForgeDirection output = this.getOutputDirection();
int xOffset = output.offsetX;
int yOffset = output.offsetY;
int zOffset = output.offsetZ;
TileEntity tile = worldObj.getTileEntity(xCoord + xOffset, yCoord + yOffset, zCoord + zOffset);
if(tile instanceof TESpellBlock && ((TESpellBlock)tile).canInputRecieveOutput(output))
{
return (TESpellBlock)tile;
}
return null;
}
public boolean canInputRecieve()
{
return true;
}
public boolean canInputRecieveOutput(ForgeDirection output)
{
return this.canInputRecieve() && this.getInputDirection().getOpposite()==output;
}
}