use of com.builtbroken.mc.api.tile.ITileModuleProvider in project Engine by VoltzEngine-Project.
the class NodeConnectionTest method testForNodes.
public void testForNodes() {
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
//Build
buildWireInDir(ForgeDirection.UNKNOWN);
buildWireInDir(side);
//Test
Location vec = center.add(side);
TileEntity tile = vec.getTileEntity();
if (tile instanceof ITileModuleProvider) {
NodeBranchPart part = ((ITileModuleProvider) tile).getModule(NodeBranchPart.class, side.getOpposite());
if (part == null)
fail("Failed to get NodeBranchPart from tile at " + vec + " from side " + side.getOpposite());
} else {
fail("Something failed good as the wire is not an instance of INodeProvider");
}
//Cleanup
center.setBlockToAir();
center.add(side).setBlockToAir();
}
}
Aggregations