mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-20 12:09:53 +00:00
Adding gitignore
This commit is contained in:
1 parent
a2b006105e
commit
ecf0a7912e
1084 files changed
+90178
-3
No files matched your search
@@ -0,0 +1,48 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user