Removing ItemRailNode and added interface implementations to PartRailing
This commit is contained in:
parent
8c49b4fcd5
commit
ad01f78493
3 changed files with 35 additions and 24 deletions
|
@ -1,11 +0,0 @@
|
||||||
package resonantinduction.electrical.itemrailing;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object that handles being the node in a multiblock pipe structure
|
|
||||||
*
|
|
||||||
* @since 16/03/14
|
|
||||||
* @author tgame14
|
|
||||||
*/
|
|
||||||
public class ItemRailNode
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,5 +1,8 @@
|
||||||
package resonantinduction.electrical.itemrailing;
|
package resonantinduction.electrical.itemrailing;
|
||||||
|
|
||||||
|
import codechicken.microblock.IHollowConnect;
|
||||||
|
import codechicken.multipart.JNormalOcclusion;
|
||||||
|
import codechicken.multipart.TSlottedPart;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.common.ForgeDirection;
|
import net.minecraftforge.common.ForgeDirection;
|
||||||
|
@ -12,8 +15,32 @@ import universalelectricity.api.energy.IEnergyNetwork;
|
||||||
* @since 16/03/14
|
* @since 16/03/14
|
||||||
* @author tgame14
|
* @author tgame14
|
||||||
*/
|
*/
|
||||||
public class PartRailing extends PartFramedConnection<PartRailing.EnumRailing, IConductor, IEnergyNetwork>
|
public class PartRailing extends PartFramedConnection<PartRailing.EnumRailing, IConductor, IEnergyNetwork> implements IConductor, TSlottedPart, JNormalOcclusion, IHollowConnect
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
|
public float getResistance ()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getCurrentCapacity ()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long onReceiveEnergy (ForgeDirection from, long receive, boolean doReceive)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long onExtractEnergy (ForgeDirection from, long extract, boolean doExtract)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
public enum EnumRailing
|
public enum EnumRailing
|
||||||
{
|
{
|
||||||
DEFAULT;
|
DEFAULT;
|
||||||
|
@ -24,6 +51,12 @@ public class PartRailing extends PartFramedConnection<PartRailing.EnumRailing, I
|
||||||
super(Electrical.itemInsulation);
|
super(Electrical.itemInsulation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doesTick ()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean canConnectTo (TileEntity tile, ForgeDirection to)
|
protected boolean canConnectTo (TileEntity tile, ForgeDirection to)
|
||||||
{
|
{
|
||||||
|
@ -33,7 +66,7 @@ public class PartRailing extends PartFramedConnection<PartRailing.EnumRailing, I
|
||||||
@Override
|
@Override
|
||||||
protected IConductor getConnector (TileEntity tile)
|
protected IConductor getConnector (TileEntity tile)
|
||||||
{
|
{
|
||||||
return null;
|
return tile instanceof IConductor ? (IConductor) ((IConductor) tile).getInstance(ForgeDirection.UNKNOWN) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
package resonantinduction.electrical.itemrailing.interfaces;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* implement this on any Multiblock
|
|
||||||
*
|
|
||||||
* @since 16/03/14
|
|
||||||
* @author tgame14
|
|
||||||
*/
|
|
||||||
public interface IItemRailNode
|
|
||||||
{
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue