Added routing nodes and a bit of infrastructure - not even working yet.

This commit is contained in:
WayofTime 2016-01-12 12:23:26 -05:00
parent 9950b32d53
commit 8b0756e9da
7 changed files with 357 additions and 7 deletions

View file

@ -0,0 +1,25 @@
package WayofTime.bloodmagic.routing;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class NodeHelper
{
public static boolean isNodeConnectionEnabled(World world, IRoutingNode node, BlockPos testPos)
{
if (!node.isConnectionEnabled(testPos))
{
return false;
}
TileEntity tile = world.getTileEntity(testPos);
if (!(tile instanceof IRoutingNode))
{
return false;
}
IRoutingNode testNode = (IRoutingNode) tile;
return testNode.isConnectionEnabled(node.getBlockPos());
}
}