public static BlockLink getBlockLink(Workspace workspace, Block block1, Block block2, BlockConnector socket1, BlockConnector socket2) {
        // If these arguments are the same as the last call to getBlockLink, return the old object instead of creating a new one
        if (!((block1.getBlockID().equals(lastPlugID) && block2.getBlockID().equals(lastSocketID)
                && socket1.equals(lastPlug) && socket2.equals(lastSocket))
                || (block2.getBlockID().equals(lastPlugID) && block1.getBlockID().equals(lastSocketID)
                && socket2.equals(lastPlug) && socket1.equals(lastSocket)))) {
            lastLink = new BlockLink(workspace, block1, block2, socket1, socket2);
        }
        return lastLink;
    }